Skip to content

Commit

Permalink
fix(sozo): update some clap arguments (#2196)
Browse files Browse the repository at this point in the history
* fix: display `manifest_path` and `offline` in short help

* fix: don't allow specifying multiple profiles
  • Loading branch information
lambda-0x authored Jul 20, 2024
1 parent e9ac65b commit 8f3cbab
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bin/sozo/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use crate::utils::generate_version;
pub struct SozoArgs {
#[arg(long)]
#[arg(global = true)]
#[arg(hide_short_help = true)]
#[arg(env = "DOJO_MANIFEST_PATH")]
#[arg(help = "Override path to a directory containing a Scarb.toml file.")]
pub manifest_path: Option<Utf8PathBuf>,
Expand All @@ -33,7 +32,7 @@ pub struct SozoArgs {

#[arg(long)]
#[arg(env = "SOZO_OFFLINE")]
#[arg(hide_short_help = true, global = true)]
#[arg(global = true)]
#[arg(help = "Run without accessing the network.")]
pub offline: bool,

Expand Down Expand Up @@ -70,15 +69,15 @@ impl SozoArgs {
#[derive(Parser, Clone, Debug)]
#[group(multiple = false)]
pub struct ProfileSpec {
#[arg(short = 'P', long, global = true)]
#[arg(short = 'P', long, global = true, group = "profiles")]
#[arg(help = "Specify profile to use by name.")]
pub profile: Option<SmolStr>,

#[arg(long, hide_short_help = true, global = true)]
#[arg(long, hide_short_help = true, global = true, group = "profiles")]
#[arg(help = "Use release profile.")]
pub release: bool,

#[arg(long, hide_short_help = true, global = true)]
#[arg(long, hide_short_help = true, global = true, group = "profiles")]
#[arg(help = "Use dev profile.")]
pub dev: bool,
}
Expand Down

0 comments on commit 8f3cbab

Please sign in to comment.