Append Windows "bin" directory to PATH#4249
Conversation
djc
left a comment
There was a problem hiding this comment.
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
|
djc
left a comment
There was a problem hiding this comment.
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
wesleywiser
left a comment
There was a problem hiding this comment.
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
PATHso that:PATHI 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
PATHif that already contains the path. This also means that the behaviour ofRUSTUP_WINDOWS_PATH_ADD_BIN=1is currently unchanged.