-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
A-custom-subcommandsArea: custom 3rd party subcommand pluginsArea: custom 3rd party subcommand pluginsA-environment-variablesArea: environment variablesArea: environment variablesC-bugCategory: bugCategory: bugS-needs-team-inputStatus: Needs input from team on whether/how to proceed.Status: Needs input from team on whether/how to proceed.
Description
Problem
Observed in rust-lang/rust-clippy#14045, if cargo +nightly clippy
is ran by a process with CARGO
pointing to the stable cargo
then nightly clippy-driver
will be ran by stable cargo
In this case that resulted in a confusing warning
Steps
-
Put the following into your
PATH
ascargo-foo
#!/usr/bin/env bash echo "$CARGO"
-
With stable cargo use
cargo run
onuse std::process::Command; fn main() { Command::new("cargo") .args(["+nightly", "foo"]) .status() .unwrap(); }
-
The 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
cargo 1.84.0 (66221abde 2024-11-19)
BrendanChou
Metadata
Metadata
Assignees
Labels
A-custom-subcommandsArea: custom 3rd party subcommand pluginsArea: custom 3rd party subcommand pluginsA-environment-variablesArea: environment variablesArea: environment variablesC-bugCategory: bugCategory: bugS-needs-team-inputStatus: Needs input from team on whether/how to proceed.Status: Needs input from team on whether/how to proceed.