Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear CARGO environment variable in cargo proxy #4175

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

smoelius
Copy link
Contributor

@smoelius smoelius commented Feb 3, 2025

Fixes rust-lang/clippy#15099

To recount the problem (copied from rust-lang/cargo#15099 (comment)):

  • The cargo proxy runs, selects the default cargo, and sets the CARGO environment variable to default toolchain's cargo.
  • That cargo invocations runs some other code, which invokes cargo +<toolchain> <subcommand>.
  • <subcommand> reads the CARGO environment variable and runs the default toolchain's cargo rather than <toolchain>'s cargo.

This PR fixes the problem by clearing the CARGO environment variable in the proxy when cargo +<toolchain> <subcommand> is run.

This PR is currently organized as eight commits:

Nits are welcome.

@smoelius smoelius marked this pull request as draft February 3, 2025 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant