Skip to content

Commit

Permalink
Fix shell check warning
Browse files Browse the repository at this point in the history
Signed-off-by: hi-rustin <[email protected]>
  • Loading branch information
Rustin170506 committed Jan 12, 2023
1 parent 3331f34 commit 2bb6323
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ci/cirrus-templates/script.bash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash

set -ex

Expand Down Expand Up @@ -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 "========="
Expand Down
1 change: 1 addition & 0 deletions ci/fetch-rust-docker.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

script_dir=$(cd "$(dirname "$0")" && pwd)
# shellcheck source=ci/shared.bash
. "$script_dir/shared.bash"

set -e
Expand Down
1 change: 1 addition & 0 deletions ci/raw_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
set -ex

sh ./rustup-init.sh --default-toolchain none -y
# shellcheck source=/dev/null
. "$HOME"/.cargo/env
rustup -Vv
2 changes: 1 addition & 1 deletion rustup-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2bb6323

Please sign in to comment.