From c8aa051cc48e84efecd48169ef26d42ac4fe2f5d Mon Sep 17 00:00:00 2001 From: Aleksandra Bozhinoska Date: Fri, 16 May 2025 16:57:48 +0200 Subject: [PATCH] SQSCANGHA-83 Avoid unbound variable error on parameter expansion (#192) --- .github/workflows/qa-main.yml | 9 ++++++--- scripts/run-sonar-scanner-cli.sh | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/qa-main.yml b/.github/workflows/qa-main.yml index 1a56855..352f7f4 100644 --- a/.github/workflows/qa-main.yml +++ b/.github/workflows/qa-main.yml @@ -11,12 +11,15 @@ jobs: noInputsTest: name: > No inputs - runs-on: ubuntu-latest + strategy: + matrix: + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 with: token: ${{ secrets.GITHUB_TOKEN }} - - name: Run action with args + - name: Run action without args uses: ./ env: SONAR_HOST_URL: http://not_actually_used @@ -831,4 +834,4 @@ jobs: if: steps.invalid_version.outcome == 'success' run: | echo "Action with invalid scannerVersion should have failed but succeeded" - exit 1 \ No newline at end of file + exit 1 diff --git a/scripts/run-sonar-scanner-cli.sh b/scripts/run-sonar-scanner-cli.sh index 1a77f07..e57ed5a 100755 --- a/scripts/run-sonar-scanner-cli.sh +++ b/scripts/run-sonar-scanner-cli.sh @@ -77,5 +77,5 @@ scanner_args+=("$@") set -ux -$SCANNER_BIN "${scanner_args[@]}" +$SCANNER_BIN ${scanner_args[@]+"${scanner_args[@]}"}