use clap::Parser;
use std::path::PathBuf;
#[derive(Parser, Debug, Clone)]
#[command(name = "ncu")]
#[command(author, version, about, long_about = None)]
pub struct Args {
#[arg(short, long)]
pub global: bool,
#[arg(value_name = "PATH", conflicts_with = "global")]
pub path: Option<PathBuf>,
#[arg(short, long)]
pub update: bool,
#[arg(short, long)]
pub minor: bool,
#[arg(short, long)]
pub force: bool,
#[arg(short, long)]
pub pre_release: bool,
}
impl Args {
pub fn project_path(&self) -> PathBuf {
self.path.clone().unwrap_or_else(|| PathBuf::from("."))
}
}