mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
Do not install rustup-toolchain if it is in PATH
This commit is contained in:
parent
b0ec33f661
commit
3fb497c8c8
1 changed files with 6 additions and 3 deletions
|
@ -1,9 +1,12 @@
|
|||
#!/bin/bash
|
||||
# Set up the appropriate rustc toolchain
|
||||
|
||||
cd $(dirname $0)
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
if ! command -v rustup-toolchain-install-master > /dev/null; then
|
||||
cargo install rustup-toolchain-install-master --debug
|
||||
fi
|
||||
|
||||
cargo install rustup-toolchain-install-master --debug || echo "rustup-toolchain-install-master already installed"
|
||||
RUSTC_HASH=$(git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}')
|
||||
rustup-toolchain-install-master -f -n master $RUSTC_HASH
|
||||
rustup-toolchain-install-master -f -n master "$RUSTC_HASH"
|
||||
rustup override set master
|
||||
|
|
Loading…
Reference in a new issue