about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2020-02-05 20:37:33 +0700
committerLzu Tao <taolzu@gmail.com>2020-02-05 20:37:33 +0700
commit46df9716af34ffd95ab1f6bf41d4da3e08e7199e (patch)
tree3d15b2e53312834637ca8a347a7b098e75e4c265
parentc881aca28263c8bc6c37a8a0bdbb76086b24f297 (diff)
downloadrust-46df9716af34ffd95ab1f6bf41d4da3e08e7199e.tar.gz
rust-46df9716af34ffd95ab1f6bf41d4da3e08e7199e.zip
Prevent failing to restart setup-toolchain
If `rustup-toolchain-install-master` fails to install master
toolchain (in case `rustup update` executes at the same remove the
tmp directory), `cargo search` (which use master toolchain after
`rustup override` command) will fail. This leads to setup-toolchain
fails too.
-rwxr-xr-xsetup-toolchain.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/setup-toolchain.sh b/setup-toolchain.sh
index 88ae90581e5..469cba1874d 100755
--- a/setup-toolchain.sh
+++ b/setup-toolchain.sh
@@ -13,7 +13,7 @@ if [[ "$INSTALLED" == false || "$RTIM_PATH" == $CARGO_HOME/bin/rustup-toolchain-
     cargo +nightly install rustup-toolchain-install-master
 else
     VERSION=$(rustup-toolchain-install-master -V | grep -o "[0-9.]*")
-    REMOTE=$(cargo search rustup-toolchain-install-master | grep -o "[0-9.]*")
+    REMOTE=$(cargo +nightly search rustup-toolchain-install-master | grep -o "[0-9.]*")
     echo "info: skipping updating rustup-toolchain-install-master at $RTIM_PATH"
     echo "      current version : $VERSION"
     echo "      remote version  : $REMOTE"