diff --git a/ci/cirrus-templates/script.bash b/ci/cirrus-templates/script.bash index 2ef6bfa2f3..0318a4a991 100644 --- a/ci/cirrus-templates/script.bash +++ b/ci/cirrus-templates/script.bash @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash set -ex @@ -26,6 +26,7 @@ echo "Install Rustup using ./rustup-init.sh" sh rustup-init.sh --default-toolchain=stable --profile=minimal -y # It's the equivalent of `source` +# shellcheck source=src/cli/self_update/env.sh source "$HOME"/.cargo/env echo "=========" diff --git a/ci/fetch-rust-docker.bash b/ci/fetch-rust-docker.bash index 479adde599..0c5122aeb2 100644 --- a/ci/fetch-rust-docker.bash +++ b/ci/fetch-rust-docker.bash @@ -1,6 +1,7 @@ #!/bin/bash script_dir=$(cd "$(dirname "$0")" && pwd) +# shellcheck source=ci/shared.bash . "$script_dir/shared.bash" set -e diff --git a/ci/raw_init.sh b/ci/raw_init.sh index d88efb2567..62c0b90203 100644 --- a/ci/raw_init.sh +++ b/ci/raw_init.sh @@ -3,5 +3,6 @@ set -ex sh ./rustup-init.sh --default-toolchain none -y +# shellcheck source=/dev/null . "$HOME"/.cargo/env rustup -Vv diff --git a/rustup-init.sh b/rustup-init.sh index e1e5d1237a..3ce77eadb2 100755 --- a/rustup-init.sh +++ b/rustup-init.sh @@ -597,7 +597,7 @@ check_help_for() { esac for _arg in "$@"; do - if ! "$_cmd" --help $_category | grep -q -- "$_arg"; then + if ! "$_cmd" --help "$_category" | grep -q -- "$_arg"; then return 1 fi done