Skip to content

Commit d530e86

Browse files
committed
Fix tip message
1 parent 817c2cb commit d530e86

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/cargo/util/command_prelude.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ pub trait CommandExt: Sized {
118118
command: &'static str,
119119
actual: &'static str,
120120
) -> Self {
121-
let msg = format!(
122-
"There is no `--{want}` for `cargo {command}`. Only `--{actual}` is supported."
123-
);
121+
let msg = format!("`cargo {command}` supports `--{actual}` instead.");
124122
let value_parser = UnknownArgumentValueParser::suggest(msg);
125123
self._arg(flag(want, "").value_parser(value_parser).hide(true))
126124
}

tests/testsuite/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ fn cargo_compile_with_unsupported_mode() {
147147
"\
148148
error: unexpected argument '--debug' found
149149
150-
tip: There is no `--debug` for `cargo build`. Only `--release` is supported.
150+
tip: `cargo build` supports `--release` instead.
151151
152152
Usage: cargo[EXE] build [OPTIONS]
153153

tests/testsuite/install.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2453,7 +2453,7 @@ fn install_with_unsupported_mode() {
24532453
"\
24542454
error: unexpected argument '--release' found
24552455
2456-
tip: There is no `--release` for `cargo install`. Only `--debug` is supported.
2456+
tip: `cargo install` supports `--debug` instead.
24572457
24582458
Usage: cargo[EXE] install [OPTIONS] [crate]...
24592459

0 commit comments

Comments
 (0)