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) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-10 11:51:51 -03:00
parent 7c1c5bd9c9
commit e6dad42c6e

View File

@@ -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);