Cached downloads confuse multirust after deleting toolchain
- Dominant language
- Shell
- Stars
- 651
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
If one installs a toolchain and then immediately removes the toolchain directory, e.g.
```
$ multirust default nightly-2015-04-28
multirust: installing toolchain 'nightly-2015-04-28'
...
install: installing component 'rustc'
install: installing component 'cargo'
install: installing component 'rust-docs'
Rust is ready to roll.
multirust: default toolchain set to 'nightly-2015-04-28'
$ rm -rf .multirust/toolchains/nightly-2015-04-28/
```
then, (obviously) rustc won't work:
```
$ rustc -V
multirust: toolchain 'nightly-2015-04-28' not installed. run `multirust update nightly-2015-04-28` to install
```
but running those commands doesn't help:
```
$ multirust update nightly-2015-04-28
multirust: installing toolchain 'nightly-2015-04-28'
rustup: gpg available. signatures will be verified
rustup: downloading manifest for 'nightly-2015-04-28'
rustup: downloading toolchain for 'nightly-2015-04-28'
rustup: 'nightly-2015-04-28' is already up to date
$ rustc -V
multirust: toolchain 'nightly-2015-04-28' not installed. run `multirust update nightly-2015-04-28` to install
```
I believe this is because https://github.com/rust-lang/rustup/blob/404d1429dbb6aa46daf92ebf268c24a93474e136/rustup.sh#L1082 shortcircuits if only the download/check isn't necessary, but the return value of 20 is taken to be a short-circuit of the whole installation: https://github.com/rust-lang/rustup/blob/404d1429dbb6aa46daf92ebf268c24a93474e136/rustup.sh#L604-L608
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.