Fixed issue with arguments after package manager
parent
66c34661bd
commit
f948c28287
@ -1,17 +1,17 @@
|
||||
use clap::{ArgAction, Parser};
|
||||
|
||||
#[derive(Debug, Clone, Parser)]
|
||||
#[clap(name=env!("CARGO_PKG_NAME"), version=env!("CARGO_PKG_VERSION"), about=env!("CARGO_PKG_DESCRIPTION"))]
|
||||
#[clap(name=env!("CARGO_PKG_NAME"), version=env!("CARGO_PKG_VERSION"), about=env!("CARGO_PKG_DESCRIPTION"), ignore_errors=true)]
|
||||
pub struct Args {
|
||||
#[clap(long, short, action=ArgAction::SetTrue)]
|
||||
pub init: bool,
|
||||
pub init: Option<bool>,
|
||||
|
||||
#[clap(long = "dest-dir", short)]
|
||||
pub dest_dir: Option<String>,
|
||||
|
||||
#[clap(long, action=ArgAction::SetTrue)]
|
||||
pub test: bool,
|
||||
pub test: Option<bool>,
|
||||
|
||||
#[clap(long, short, action=ArgAction::SetTrue)]
|
||||
pub verbose: bool,
|
||||
pub verbose: Option<bool>,
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
pub enum AppExitCode {
|
||||
Success = 1, // the correct package manager
|
||||
Success = 1, // Success technically is still wrong since the user used the wrong package manager
|
||||
CalledDirectly = 2,
|
||||
}
|
||||
|
Loading…
Reference in New Issue