diff --git a/.github/scripts/validateActionsAndWorkflows.sh b/.github/scripts/validateActionsAndWorkflows.sh index 0c373a0a247a..b4474560c0c9 100755 --- a/.github/scripts/validateActionsAndWorkflows.sh +++ b/.github/scripts/validateActionsAndWorkflows.sh @@ -52,7 +52,7 @@ for ((i=0; i < ${#WORKFLOWS[@]}; i++)); do done # Wait for the background builds to finish -for PID in ${ASYNC_PROCESSES[*]}; do +for PID in "${ASYNC_PROCESSES[@]}"; do wait $PID RESULT=$? if [[ $RESULT != 0 ]]; then diff --git a/.github/scripts/verifyActions.sh b/.github/scripts/verifyActions.sh index 8e2621ab43d2..28495eee14b9 100755 --- a/.github/scripts/verifyActions.sh +++ b/.github/scripts/verifyActions.sh @@ -23,6 +23,6 @@ if [[ EXIT_CODE -eq 0 ]]; then exit 0 else echo -e "${RED}Error: Diff found when Github Actions were rebuilt. Did you forget to run \`npm run gh-actions-build\` after a clean install (\`rm -rf node_modules && npm i\`)? Do you need to merge main?${NC}" - echo "$DIFF_OUTPUT" | $LIB_PATH/diff-so-fancy | less --tabs=4 -RFX + echo "$DIFF_OUTPUT" | "$LIB_PATH/diff-so-fancy" | less --tabs=4 -RFX exit 1 fi diff --git a/.github/scripts/verifyPodfile.sh b/.github/scripts/verifyPodfile.sh index bdec339a0eed..213da895d365 100755 --- a/.github/scripts/verifyPodfile.sh +++ b/.github/scripts/verifyPodfile.sh @@ -10,7 +10,7 @@ podfileLockSha=$(awk '/PODFILE CHECKSUM: /{print $3}' ios/Podfile.lock) echo "Podfile: $podfileSha" echo "Podfile.lock: $podfileLockSha" -if [ $podfileSha == $podfileLockSha ]; then +if [ "$podfileSha" == "$podfileLockSha" ]; then echo -e "${GREEN}Podfile verified!${NC}" exit 0 else diff --git a/scripts/set-pusher-suffix.sh b/scripts/set-pusher-suffix.sh index 673d61c59d4b..e1620b149f7b 100755 --- a/scripts/set-pusher-suffix.sh +++ b/scripts/set-pusher-suffix.sh @@ -6,7 +6,7 @@ CONFIG_FILE="../Web-Expensify/_config.local.php" if [ -f ".env" ]; then # Export vars from the .env file to access the $EXPENSIFY_URL - export $(grep -v '^#' .env | xargs) + export "$(grep -v '^#' .env | xargs)" fi # use the suffix only when the config file can be found diff --git a/scripts/shellCheck.sh b/scripts/shellCheck.sh index f87d20e1ab87..d5cfdba78826 100755 --- a/scripts/shellCheck.sh +++ b/scripts/shellCheck.sh @@ -10,7 +10,7 @@ SHELL_SCRIPTS=$(find . -type d \( -path ./node_modules -o -path ./vendor -o -pat ASYNC_PROCESSES=() for SHELL_SCRIPT in $SHELL_SCRIPTS; do - npx shellcheck "$SHELL_SCRIPT" & + npx shellcheck -e SC1091 "$SHELL_SCRIPT" & ASYNC_PROCESSES+=($!) done diff --git a/tests/unit/getPullRequestsMergedBetweenTest.sh b/tests/unit/getPullRequestsMergedBetweenTest.sh index 538de83700b4..e9b1b75a079f 100755 --- a/tests/unit/getPullRequestsMergedBetweenTest.sh +++ b/tests/unit/getPullRequestsMergedBetweenTest.sh @@ -289,7 +289,7 @@ git checkout main git checkout -b version-bump npm --no-git-tag-version version 1.1.1 -m "Update version to 1.1.1" git add package.json package-lock.json -git commit -m "Update version to $(cat package.json | jq -r .version)" +git commit -m "Update version to $(jq -r .version < package.json)" git checkout main git merge version-bump --no-ff -m "Merge pull request #12 from Expensify/version-bump" info "Merged PR #12 into main"