fix: stop deleting $CARGO_HOME during uninstall#4861
Open
Cloud0310 wants to merge 10 commits into
Open
Conversation
Contributor
Author
|
I think I may need more tests against this PR, this includes:
Should there be more tests? Please let me know @FranciscoTGouveia @rami3l . |
rami3l
reviewed
May 19, 2026
rami3l
reviewed
May 19, 2026
djc
reviewed
May 20, 2026
Contributor
Author
|
I've add more tests about the PR here. Please review. |
rami3l
reviewed
May 21, 2026
rami3l
approved these changes
May 21, 2026
4a4880a to
971dffa
Compare
Cloud0310
added a commit
to Cloud0310/rustup
that referenced
this pull request
May 22, 2026
Avoid removing $CARGO_HOME when running uninstall cleanup. Combine all follow-up work for PR rust-lang#4861: - keep $CARGO_HOME/bin when it is non-empty - cover cargo bin cleanup behavior in uninstall tests - update uninstall cleanup comments and related docs - rename cleanup internals for clearer intent
Cloud0310
added a commit
to Cloud0310/rustup
that referenced
this pull request
May 22, 2026
Avoid removing $CARGO_HOME when running uninstall cleanup. Combine all follow-up work for PR rust-lang#4861: - keep $CARGO_HOME/bin when it is non-empty - cover cargo bin cleanup behavior in uninstall tests - update uninstall cleanup comments and related docs - rename cleanup internals for clearer intent
This comment has been minimized.
This comment has been minimized.
Cloud0310
added a commit
to Cloud0310/rustup
that referenced
this pull request
May 22, 2026
Avoid removing $CARGO_HOME when running uninstall cleanup. Combine all follow-up work for PR rust-lang#4861: - keep $CARGO_HOME/bin when it is non-empty - cover cargo bin cleanup behavior in uninstall tests - update uninstall cleanup comments and related docs - rename cleanup internals for clearer intent
djc
reviewed
May 22, 2026
Cloud0310
added a commit
to Cloud0310/rustup
that referenced
this pull request
May 22, 2026
Avoid removing $CARGO_HOME when running uninstall cleanup. Combine all follow-up work for PR rust-lang#4861: - keep $CARGO_HOME/bin when it is non-empty - cover cargo bin cleanup behavior in uninstall tests - update uninstall cleanup comments and related docs - rename cleanup internals for clearer intent
Cloud0310
added a commit
to Cloud0310/rustup
that referenced
this pull request
May 22, 2026
Avoid removing $CARGO_HOME when running uninstall cleanup. Combine all follow-up work for PR rust-lang#4861: - keep $CARGO_HOME/bin when it is non-empty - cover cargo bin cleanup behavior in uninstall tests - update uninstall cleanup comments and related docs - rename cleanup internals for clearer intent
c8af677 to
31432e4
Compare
djc
reviewed
Jun 11, 2026
rami3l
reviewed
Jun 11, 2026
rami3l
reviewed
Jun 12, 2026
e40d302 to
e71fcc4
Compare
…` to parent module
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #285
This PR fix the cargo bin nuke and the path removing possilble toutoc issue.
Here's the implementation details:
This prevents
rustup self uninstallfrom nuking out the$CARGO_HOME/binand possible toctou problem of removing up the path.