You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rustup run $toolchain cargo succeeds even if $toolchain is not installed #792
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:
Activity
Diggsey commentedon May 3, 2017
This seems to be fixed when I try to reproduce.