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 run $toolchain cargo succeeds even if $toolchain is not installed #792

Closed
kamalmarhubi opened this issue Nov 4, 2016 · 1 comment

Comments

@kamalmarhubi
Copy link
Contributor

kamalmarhubi commented Nov 4, 2016

This is unexpected, and can lead to confusion if trying out cargo build or cargo test with some older versions. You end up silently building against nightly instead (see below).

$ rustup --version
rustup 0.6.4 (e6dc1c6 2016-10-24)
$ rustup run 1.0 rustc --version
error: toolchain '1.0' is not installed
$ rustup run 1.0 cargo --version
cargo 0.13.0-nightly (717adc8 2016-11-02)

The call to cargo should fail as well.

To demonstrate that other non-cargo commands do not run:

$ rustup run 1.0 which cargo
error: toolchain '1.0' is not installed

It seems that the silent successful cargo commands use nightly:

$ cd $(mktemp -d)
$ cargo new bad  # to get a valid Cargo.toml
     Created library `bad` project
$ cd bad
$ rustup run 1.0 cargo rustc does-not-exist.rs -- --version
   Compiling bad v0.1.0 (file:///tmp/tmp.iiZg2tF5CK/bad)
rustc 1.14.0-nightly (5665bdf3e 2016-11-02)
    Finished debug [unoptimized + debuginfo] target(s) in 0.2 secs

I think it's using the nightly channel and not a specific nightly, as I hadn't installed 2016-11-02 explicitly:

$ ls $HOME/.multirust/toolchains
1.2.0-x86_64-unknown-linux-gnu  nightly-2016-10-26
1.8.0-x86_64-unknown-linux-gnu  nightly-2016-10-28
beta-x86_64-unknown-linux-gnu   nightly-x86_64-unknown-linux-gnu
nightly-2016-10-09              stable-x86_64-unknown-linux-gnu
nightly-2016-10-19
@Diggsey
Copy link
Contributor

Diggsey commented May 3, 2017

This seems to be fixed when I try to reproduce.

@Diggsey Diggsey closed this as completed May 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants