Skip to content

Commit 8f7ab52

Browse files
author
Jon Gjengset
committed
Match semantics of SubcommandRequiredElseHelp
1 parent dfda89a commit 8f7ab52

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/bin/cargo/commands/config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ pub fn cli() -> App {
66
.about("Inspect configuration values")
77
.after_help("Run `cargo help config` for more detailed information.\n")
88
.subcommand_required(true)
9+
.arg_required_else_help(true)
910
.subcommand(
1011
subcommand("get")
1112
.arg(Arg::new("key").help("The config key to display"))

src/bin/cargo/commands/report.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ pub fn cli() -> App {
77
.about("Generate and display various kinds of reports")
88
.after_help("Run `cargo help report` for more detailed information.\n")
99
.subcommand_required(true)
10+
.arg_required_else_help(true)
1011
.subcommand(
1112
subcommand("future-incompatibilities")
1213
.alias("future-incompat")

0 commit comments

Comments
 (0)