mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-26 19:36:46 -06:00
M0.9: --help wins over an earlier bad option (#1155)
Review: `mcp --bogus --help` stopped at --bogus with exit 2. The parser now keeps the first bad option and reports it only when no --help or -h follows.
This commit is contained in:
@@ -60,6 +60,7 @@ fn help_after_a_subcommand_prints_the_usage() {
|
||||
&["plugin", "publish", "--help"],
|
||||
&["perf", "--help"],
|
||||
&["mcp", "--attach", "notaport", "--help"],
|
||||
&["mcp", "--bogus", "--help"],
|
||||
] {
|
||||
let out = bin().args(args).stdin(Stdio::null()).output().unwrap();
|
||||
assert_eq!(out.status.code(), Some(0), "{args:?}: {}", String::from_utf8_lossy(&out.stderr));
|
||||
|
||||
Reference in New Issue
Block a user