From 7ae60c18584d8a407c261ac9fafc91d78c818b70 Mon Sep 17 00:00:00 2001 From: Palagiri Subba Reddy Date: Mon, 22 Jun 2026 22:48:21 +0530 Subject: [PATCH] fix: enforce mutually exclusive CLI logging arguments Signed-off-by: Palagiri Subba Reddy --- lore-client/src/cli/cli.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lore-client/src/cli/cli.rs b/lore-client/src/cli/cli.rs index 6d6216d..f40fc42 100644 --- a/lore-client/src/cli/cli.rs +++ b/lore-client/src/cli/cli.rs @@ -17,7 +17,6 @@ use crate::println; use crate::styling::cli_styles; use crate::util::get_repository_path; -// TODO(UCS-12558): Cleanup logging args #[derive(Parser)] #[command(name = "lore", styles = cli_styles())] #[clap(about, long_about = None)] @@ -31,15 +30,15 @@ pub struct LoreCli { pub repository: Option, /// Set the logging level - #[clap(global = true, long = "log-level", value_name = "level")] + #[clap(global = true, long = "log-level", value_name = "level", conflicts_with_all = ["debug", "silent"])] pub level: Option, /// Enable debug output - #[clap(global = true, long, short, action)] + #[clap(global = true, long, short, action, conflicts_with_all = ["level", "silent"])] pub debug: bool, /// Suppress all output - #[clap(global = true, hide = true, long, short, action)] + #[clap(global = true, hide = true, long, short, action, conflicts_with_all = ["level", "debug"])] pub silent: bool, /// Time execution of command