From 8f3cbab6f653029f1b96829a47db42207325a289 Mon Sep 17 00:00:00 2001 From: lambda-0x <0xlambda@protonmail.com> Date: Sun, 21 Jul 2024 02:53:25 +0530 Subject: [PATCH] fix(sozo): update some clap arguments (#2196) * fix: display `manifest_path` and `offline` in short help * fix: don't allow specifying multiple profiles --- bin/sozo/src/args.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/sozo/src/args.rs b/bin/sozo/src/args.rs index d190da8fb9..57c1c53ac8 100644 --- a/bin/sozo/src/args.rs +++ b/bin/sozo/src/args.rs @@ -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, @@ -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, @@ -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, - #[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, }