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

Cannot remove linked toolchain #1169

Closed
RalfJung opened this issue Jun 16, 2017 · 3 comments
Closed

Cannot remove linked toolchain #1169

RalfJung opened this issue Jun 16, 2017 · 3 comments
Labels

Comments

@RalfJung
Copy link
Member

I added a toolchain via rustup toolchain link myrust <path> that I now want to remove. However, rustup toolchain uninstall myrust says info: no toolchain installed for 'myrust'. It seems that either it is impossible to uninstall ("unlink") a linked toolchain, or at least that feature it so well hidden that it is very hard to find.

@brson
Copy link
Contributor

brson commented Jun 24, 2017

Hm, that's not expected behavior. If there's a symlink under ~/.cargo/toolchains/myrust, rustup should remove it in this case.

@brson brson added the bug label Jun 24, 2017
@RalfJung
Copy link
Member Author

I suppose you mean ~/.rustup/...? Yes, there is such a symlink.

@RalfJung
Copy link
Member Author

RalfJung commented Jul 12, 2017

I tested this again and now it works.

I think what may have happened is that the toolchain symlink became stale when I did a ./x.py clean, and now that I have a compiler built again the symlink works again. Not sure what the intended behavior is in this case, but I'd argue that uninstalling a toolchain should work even if the symlink no longer points to a valid toolchain.

EDIT: Indeed I can reproduce the issue by putting a dead symlink (not pointing to anything) into the toolchain directory and trying to uninstall it.

bors added a commit that referenced this issue Aug 12, 2017
correctly uninstall toolchains that are stale symlinks

Fixes #1169

I'd like to add a test for this -- what is the best way to do that?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants