Skip to content

Commit cafafcc

Browse files
authored
Merge pull request #3121 from hi-rustin/rustin-patch-shell-check
Fix shell check warnings
2 parents 2850e7e + c69e6a2 commit cafafcc

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

.github/workflows/centos-fmt-clippy-on-all.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ jobs:
8282
sh ./ci/raw_init.sh
8383
- name: Run shell checks
8484
run: |
85-
shellcheck -s dash -- rustup-init.sh
86-
git ls-files -- '*.sh' | xargs shellcheck -s dash -e SC1090
87-
git ls-files -- '*.bash' | xargs shellcheck -s bash -e SC1090
85+
shellcheck -x -s dash -- rustup-init.sh
86+
git ls-files -- '*.sh' | xargs shellcheck -x -s dash
87+
git ls-files -- '*.bash' | xargs shellcheck -x -s bash
8888
- name: Run formatting checks
8989
run: |
9090
cargo fmt --all --check

ci/actions-templates/centos-fmt-clippy-template.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ jobs:
8282
sh ./ci/raw_init.sh
8383
- name: Run shell checks
8484
run: |
85-
shellcheck -s dash -- rustup-init.sh
86-
git ls-files -- '*.sh' | xargs shellcheck -s dash -e SC1090
87-
git ls-files -- '*.bash' | xargs shellcheck -s bash -e SC1090
85+
shellcheck -x -s dash -- rustup-init.sh
86+
git ls-files -- '*.sh' | xargs shellcheck -x -s dash
87+
git ls-files -- '*.bash' | xargs shellcheck -x -s bash
8888
- name: Run formatting checks
8989
run: |
9090
cargo fmt --all --check

ci/cirrus-templates/script.bash

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/bash
22

33
set -ex
44

@@ -26,6 +26,7 @@ echo "Install Rustup using ./rustup-init.sh"
2626

2727
sh rustup-init.sh --default-toolchain=stable --profile=minimal -y
2828
# It's the equivalent of `source`
29+
# shellcheck source=src/cli/self_update/env.sh
2930
source "$HOME"/.cargo/env
3031

3132
echo "========="

ci/fetch-rust-docker.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

33
script_dir=$(cd "$(dirname "$0")" && pwd)
4+
# shellcheck source=ci/shared.bash
45
. "$script_dir/shared.bash"
56

67
set -e

ci/raw_init.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
set -ex
44

55
sh ./rustup-init.sh --default-toolchain none -y
6+
# shellcheck source=src/cli/self_update/env.sh
67
. "$HOME"/.cargo/env
78
rustup -Vv

rustup-init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ check_help_for() {
597597
esac
598598

599599
for _arg in "$@"; do
600-
if ! "$_cmd" --help $_category | grep -q -- "$_arg"; then
600+
if ! "$_cmd" --help "$_category" | grep -q -- "$_arg"; then
601601
return 1
602602
fi
603603
done

0 commit comments

Comments
 (0)