Safer cargo command (#9437)

This commit is contained in:
Jack May 2020-04-10 15:44:24 -07:00 committed by GitHub
parent aa8dfac313
commit 6e1ce5ab6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -36,7 +36,12 @@ download() {
# Install xargo
(
set -ex
cargo +"${rust_stable:-}" install xargo
# shellcheck disable=SC2154
if [[ -n $rust_stable ]]; then
cargo +"$rust_stable" install xargo
else
cargo install xargo
fi
xargo --version > xargo.md 2>&1
)
# shellcheck disable=SC2181