Skip to content

Commit 059568f

Browse files
committed
Auto merge of #4856 - lzutao:rtim-non-installed, r=flip1995
build: check if RTIM is not installed changelog: none
2 parents 0403687 + d9af448 commit 059568f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

setup-toolchain.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ set -e
55

66
cd "$(dirname "$0")"
77

8-
RTIM_PATH=$(command -v rustup-toolchain-install-master)
8+
RTIM_PATH=$(command -v rustup-toolchain-install-master) || INSTALLED=false
99
CARGO_HOME=${CARGO_HOME:-$HOME/.cargo}
1010

11-
# Check if people also install RTIM in other locations beside
12-
# ~/.cargo/bin
13-
if [[ "$RTIM_PATH" == $CARGO_HOME/bin/rustup-toolchain-install-master ]]; then
11+
# Check if RTIM is not installed or installed in other locations not in ~/.cargo/bin
12+
if [[ "$INSTALLED" == false || "$RTIM_PATH" == $CARGO_HOME/bin/rustup-toolchain-install-master ]]; then
1413
cargo +nightly install rustup-toolchain-install-master
1514
else
1615
VERSION=$(rustup-toolchain-install-master -V | grep -o "[0-9.]*")

0 commit comments

Comments
 (0)