From 46df9716af34ffd95ab1f6bf41d4da3e08e7199e Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Wed, 5 Feb 2020 20:37:33 +0700 Subject: [PATCH] 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. --- setup-toolchain.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup-toolchain.sh b/setup-toolchain.sh index 88ae90581..469cba187 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"