cli: add rustup self uninstall --no-modify-path#4534
cli: add rustup self uninstall --no-modify-path#4534rami3l merged 4 commits intorust-lang:mainfrom cyqsimon:uninstall-no-modify-path
rustup self uninstall --no-modify-path#4534Conversation
|
Not really sure how to properly add the tests that check for environment variable configuration. There doesn't seem to be existing infrastructure for testing this sort of thing. Also I don't really understand how the current tests are avoiding modifying the user's actual rc files. I imagine the provisions for it must be hidden away somewhere in the test harness but I just couldn't find it. |
@cyqsimon That's a completely fine question to ask! I think you can find some inspiration from: rustup/tests/suite/cli_paths.rs Lines 239 to 267 in 2bd6356 Basically we use |
|
Alright I've added the tests. When I initially went over the existing tests I was fixated on How would you like me to resolve the conflict with #4536? Merge or rebase? |
|
Rebase please! |
|
I have having a very difficult time reproducing the CI error locally (or in fact, making sense of it at all). Will keep trying for the time being. Edit: seems like there's some shenanigans influencing whether |
|
@cyqsimon Many thanks all the same! I think I can have a look at that... I'll let you know if I've found anything 🙏 |
|
@cyqsimon That's quite easy actually: in our Ubuntu CI environment there's no |
I see. But shouldn't the fix be to install zsh in the CI, so that the relevant code paths are actually tested? |
@cyqsimon I see your point here; however I don't think a typical Linux environment assumes zsh, so this might confuse more users than it should when they are developing rustup on Linux; we want the test suite to have as few surprising external dependencies as possible. Also I don't think placing a dynamic predicate for both cases is a good choice either, the point being you are almost always testing one specific path in the CI and the opposite path almost never gets tested and could rust over time. This has happened before in this repo's history for a few times, unfortunately... As a compromise I think you can put a |
Yep that sounds reasonable. Will do that. And what about |
Help text is mirrored from `rustup-init -y`
|
Rebased to resolve merge conflicts. |
@cyqsimon You can mirror that in a separate commit if you want. |
…doesnt_modify_rcs_with_no_modify_path`
Closes #4529
TODO