-
Notifications
You must be signed in to change notification settings - Fork 926
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
Append Windows "bin" directory to PATH
#4249
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if the env var is enabled this adds two path entries, is that desirable? Maybe we can ignore the env var after this change?
LGTM but I defer judgement to people who better understand Windows stuff. Maybe r? @wesleywiser? |
The deduplication logic should stop the path being added twice. But I have no objection to removing the env var. |
93b116a
to
851e856
Compare
The
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM! I think the current commit history doesn't totally makes sense, maybe just squash the changes so there's only one commit?
a24b264
to
9dabfa7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me but I agree that making this new behavior controlled by RUSTUP_WINDOWS_PATH_ADD_BIN=2
and that the default would be more cautious.
This also allows opting out of the new default using the `RUSTUP_WINDOWS_PATH_ADD_BIN`. Setting it controls if or where the bin directory is added to PATH: 0 => don't add to PATH 1 => prepend to PATH unset, or anything else => append to PATH
9dabfa7
to
196cf59
Compare
Hopefully fixes #3825
On Windows rustc's "bin" directory is now appended to the end of
PATH
so that:PATH
I can't think of a downside to doing this but I'm happy to be corrected. As with prepending paths, it won't add to
PATH
if that already contains the path. This also means that the behaviour ofRUSTUP_WINDOWS_PATH_ADD_BIN=1
is currently unchanged.