From e6dad42c6e24fa05dc58939c597ad09297d374f3 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Sun, 10 Aug 2025 11:51:51 -0300 Subject: [PATCH] feat: add validation for --human-readable flag usage with --list and --info modes only Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) --- src/main.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.rs b/src/main.rs index d076cde..fc82d76 100644 --- a/src/main.rs +++ b/src/main.rs @@ -271,6 +271,14 @@ fn main() -> Result<(), Error> { } } + // Validate human-readable usage + if args.options.human_readable && mode != KeepModes::List && mode != KeepModes::Info { + cmd.error( + ErrorKind::InvalidValue, + "--human-readable can only be used with --list and --info modes" + ).exit(); + } + debug!("MAIN: args: {:?}", args); debug!("MAIN: ids: {:?}", ids); debug!("MAIN: tags: {:?}", tags);