mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
Add details in warning for alias shadowing external subcommands
This commit is contained in:
parent
3a5bb75467
commit
cba8503e3a
@ -267,7 +267,10 @@ fn expand_aliases(
|
||||
// a hard error.
|
||||
if let Some(path) = super::find_external_subcommand(config, cmd) {
|
||||
config.shell().warn(format!(
|
||||
"user-defined alias `{}` is shadowing an external subcommand found at: `{}`",
|
||||
"\
|
||||
user-defined alias `{}` is shadowing an external subcommand found at: `{}`
|
||||
This was previously accepted but is being phased out; it will become a hard error in a future release.
|
||||
For more information, see issue #10049 <https://github.com/rust-lang/cargo/issues/10049>.",
|
||||
cmd,
|
||||
path.display(),
|
||||
))?;
|
||||
|
@ -101,7 +101,9 @@ fn default_args_alias() {
|
||||
.env("PATH", &path)
|
||||
.with_status(101)
|
||||
.with_stderr("\
|
||||
warning: user-defined alias `echo` is shadowing an external subcommand found at: `[ROOT]/cargo-echo/target/debug/cargo-echo[EXE]`
|
||||
[WARNING] user-defined alias `echo` is shadowing an external subcommand found at: `[ROOT]/cargo-echo/target/debug/cargo-echo[EXE]`
|
||||
This was previously accepted but is being phased out; it will become a hard error in a future release.
|
||||
For more information, see issue #10049 <https://github.com/rust-lang/cargo/issues/10049>.
|
||||
error: alias echo has unresolvable recursive definition: echo -> echo
|
||||
",
|
||||
)
|
||||
@ -111,7 +113,9 @@ error: alias echo has unresolvable recursive definition: echo -> echo
|
||||
.env("PATH", &path)
|
||||
.with_status(101)
|
||||
.with_stderr("\
|
||||
warning: user-defined alias `echo` is shadowing an external subcommand found at: `[ROOT]/cargo-echo/target/debug/cargo-echo[EXE]`
|
||||
[WARNING] user-defined alias `echo` is shadowing an external subcommand found at: `[ROOT]/cargo-echo/target/debug/cargo-echo[EXE]`
|
||||
This was previously accepted but is being phased out; it will become a hard error in a future release.
|
||||
For more information, see issue #10049 <https://github.com/rust-lang/cargo/issues/10049>.
|
||||
error: alias test-1 has unresolvable recursive definition: test-1 -> echo -> echo
|
||||
",
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user