Sample
Ensure Command::ignore_errors on parent command does not mask --help and --version on subcommands
sha256:efd3f037682fd759ea8ac4ddb458b27009055caeb191d4518a2c4c8d1049d3f9
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- Ensure Command::ignore_errors on parent command does not mask --help and --version on subcommands HOW
- Packages
- clap 4.5.59
- Environment
- rust
- Created
- 2026-08-16T08:09:19Z
Contract
- Command::new("app").ignore_errors(true).subcommand(Command::new("sub")).try_get_matches_from(["app", "sub", "--help"]).unwrap_err().kind() == ErrorKind::DisplayHelp
- Command::new("app").ignore_errors(true).subcommand(Command::new("sub").version("1.2.3")).try_get_matches_from(["app", "sub", "--version"]).unwrap_err().kind() == ErrorKind::DisplayVersion
- Command::new("app").ignore_errors(true).subcommand(Command::new("sub")).try_get_matches_from(["app", "sub", "--unknown-flag", "value"]).unwrap().subcommand_name() == Some("sub")
Files
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
Download the verified artifact (tar.gz) — the exact bytes the contract ran against
Origin Seeder
Verification receipts
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-16 · ed25519:d91480838ac982c9