Skip to content

Commit

Permalink
Better suggestion for unsupported mode in install command
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustin170506 committed Sep 20, 2023
1 parent 1002c90 commit bc5b1f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/bin/cargo/commands/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ pub fn cli() -> Command {
"debug",
"Build in debug mode (with the 'dev' profile) instead of release mode",
))
.arg_unsupported_mode("release", "install", "debug")
.arg_profile("Install artifacts with the specified profile")
.arg_target_triple("Build for the target triple")
.arg_target_dir()
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/util/command_prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ Run `{cmd}` to see possible targets."

let name = match (
self.maybe_flag("release"),
self.flag("debug"),
self.maybe_flag("debug"),
specified_profile,
) {
(false, false, None) => default,
Expand Down

0 comments on commit bc5b1f8

Please sign in to comment.