Skip to content

Commit b3c41dc

Browse files
committed
Better suggestion for unsupported mode in install command
1 parent 4b04343 commit b3c41dc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/bin/cargo/commands/install.rs

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ pub fn cli() -> Command {
8383
"debug",
8484
"Build in debug mode (with the 'dev' profile) instead of release mode",
8585
))
86+
.arg_unsupported_mode("release", "install", "debug")
8687
.arg_profile("Install artifacts with the specified profile")
8788
.arg_target_triple("Build for the target triple")
8889
.arg_target_dir()

src/cargo/util/command_prelude.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ Run `{cmd}` to see possible targets."
525525

526526
let name = match (
527527
self.maybe_flag("release"),
528-
self.flag("debug"),
528+
self.maybe_flag("debug"),
529529
specified_profile,
530530
) {
531531
(false, false, None) => default,

0 commit comments

Comments
 (0)