From a95d08dffc954fb533cad79ced2c16318dda460f Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sun, 13 Oct 2024 23:47:19 +0200 Subject: [PATCH] GH Actions: always quote variables ... to satisfy shellcheck rule SC2086: "Double quote to prevent globbing and word splitting". Ref: https://www.shellcheck.net/wiki/SC2086 --- .github/workflows/basic-qa.yml | 2 +- .github/workflows/unit-tests.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/basic-qa.yml b/.github/workflows/basic-qa.yml index 8c3975499..c804fcb12 100644 --- a/.github/workflows/basic-qa.yml +++ b/.github/workflows/basic-qa.yml @@ -186,7 +186,7 @@ jobs: set +e $(pwd)/vendor/bin/phpcbf -pq ./WordPress/Tests/ --standard=WordPress --extensions=inc --exclude=Generic.PHP.Syntax --report=summary --ignore=/WordPress/Tests/WP/GlobalVariablesOverrideUnitTest.7.inc exitcode="$?" - echo "EXITCODE=$exitcode" >> $GITHUB_OUTPUT + echo "EXITCODE=$exitcode" >> "$GITHUB_OUTPUT" exit "$exitcode" - name: Fail the build on fixer conflicts and other errors diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 44efaebb8..85ab0d42e 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -91,9 +91,9 @@ jobs: id: set_ini run: | if [ "${{ matrix.dependencies }}" != "dev" ]; then - echo 'PHP_INI=error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On' >> $GITHUB_OUTPUT + echo 'PHP_INI=error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On' >> "$GITHUB_OUTPUT" else - echo 'PHP_INI=error_reporting=-1, display_errors=On' >> $GITHUB_OUTPUT + echo 'PHP_INI=error_reporting=-1, display_errors=On' >> "$GITHUB_OUTPUT" fi - name: Set up PHP