mirror of
https://github.com/openai/codex.git
synced 2026-09-09 15:58:47 +00:00
Fix queue subcommand parsing
This commit is contained in:
@@ -69,6 +69,8 @@ use codex_terminal_detection::TerminalName;
|
||||
version,
|
||||
// If a sub‑command is given, ignore requirements of the default args.
|
||||
subcommand_negates_reqs = true,
|
||||
// Prefer a recognized subcommand over the default interactive prompt positional.
|
||||
subcommand_precedence_over_arg = true,
|
||||
// The executable is sometimes invoked via a platform‑specific name like
|
||||
// `codex-x86_64-unknown-linux-musl`, but the help output should always use
|
||||
// the generic `codex` command name that users run.
|
||||
|
||||
@@ -191,6 +191,13 @@ mod tests {
|
||||
assert_eq!(cmd.at, None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn queue_without_required_args_is_subcommand_error() {
|
||||
let err = MultitoolCli::try_parse_from(["codex", "queue"])
|
||||
.expect_err("queue should be parsed as a subcommand, not as an interactive prompt");
|
||||
assert_eq!(err.kind(), clap::error::ErrorKind::MissingRequiredArgument);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn queue_rejects_legacy_content_flag() {
|
||||
assert!(
|
||||
|
||||
Reference in New Issue
Block a user