mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
fix(cli): Don't use 'did you mean' for +toolchain errors
This commit is contained in:
parent
3f48c221b9
commit
759178e42b
@ -289,8 +289,7 @@ fn execute_external_subcommand(gctx: &GlobalContext, cmd: &str, args: &[&OsStr])
|
||||
let err = if cmd.starts_with('+') {
|
||||
anyhow::format_err!(
|
||||
"no such command: `{cmd}`\n\n\t\
|
||||
Cargo does not handle `+toolchain` directives.\n\t\
|
||||
Did you mean to invoke `cargo` through `rustup` instead?{script_suggestion}",
|
||||
help: invoke `cargo` through `rustup` to handle `+toolchain` directives{script_suggestion}",
|
||||
)
|
||||
} else {
|
||||
let suggestions = list_commands(gctx);
|
||||
|
@ -549,8 +549,7 @@ fn subcommand_leading_plus_output_contains() {
|
||||
.with_stderr_data(str![[r#"
|
||||
[ERROR] no such command: `+nightly`
|
||||
|
||||
Cargo does not handle `+toolchain` directives.
|
||||
Did you mean to invoke `cargo` through `rustup` instead?
|
||||
[HELP] invoke `cargo` through `rustup` to handle `+toolchain` directives
|
||||
|
||||
"#]])
|
||||
.run();
|
||||
|
Loading…
x
Reference in New Issue
Block a user