$CARGO
passed to external subcommands can point to the wrong cargo
if already set
#15099
Labels
A-custom-subcommands
Area: custom 3rd party subcommand plugins
A-environment-variables
Area: environment variables
C-bug
Category: bug
S-triage
Status: This issue is waiting on initial triage.
Problem
Observed in rust-lang/rust-clippy#14045, if
cargo +nightly clippy
is ran by a process withCARGO
pointing to the stablecargo
then nightlyclippy-driver
will be ran by stablecargo
In this case that resulted in a confusing warning
Steps
Put the following into your
PATH
ascargo-foo
With stable cargo use
cargo run
onThe output will be
.../.rustup/toolchains/stable-.../bin/cargo
Possible Solution(s)
Looks to be due to #11285, perhaps there could be an exception for when the current exe really is
cargo
Notes
No response
Version
The text was updated successfully, but these errors were encountered: