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

rustup toolchain list should only consider directories as toolchains #520

Closed
ipetkov opened this issue Jun 8, 2016 · 2 comments
Closed

Comments

@ipetkov
Copy link
Contributor

ipetkov commented Jun 8, 2016

Was pretty surprised seeing .DS_Store as a toolchain since I don't remember installing it ;)

$ rustup toolchain list
nightly-x86_64-apple-darwin (default)
.DS_Store

Of course one can also trick rustup by making an empty directory in its toolchains directory, but I suppose this is by design

$ mkdir $RUSTUP_HOME/toolchains/foo_bar
$ rustup toolchain list
nightly-x86_64-apple-darwin (default)
.DS_Store
foo_bar
@brson
Copy link
Contributor

brson commented Jun 23, 2016

Haha yes. This should be an easy fix. Just change the code here to check is_dir.

@ipetkov
Copy link
Contributor Author

ipetkov commented Jun 24, 2016

@brson yep, already submitted a PR (#544)!

nodakai pushed a commit to nodakai/rustup.rs that referenced this issue Apr 23, 2017
* Regular files in the toolchains directory will not be considered
  valid toolchain names
* If a user opens their $RUSTUP_HOME/toolchains directory with their
  file explorer, the OS may create some files there (e.g. .DS_Store on
  OS X), which we do not want listed as installed toolchains
* Fixes rust-lang#520
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants