Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Commit d08d592

Browse files
SCSCANGHA-16 Support passing args with spaces (#79)
1 parent a69a8ed commit d08d592

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/qa.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ jobs:
1919
- name: Run action with args
2020
uses: ./
2121
with:
22-
args: -Dsonar.someArg=aValue -Dsonar.scanner.dumpToFile=./output.properties
22+
args: >-
23+
"-Dsonar.someArg=a value with spaces" -Dsonar.scanner.dumpToFile=./output.properties
2324
env:
2425
SONAR_TOKEN: FAKE_TOKEN
2526
- name: Assert
2627
run: |
27-
./test/assertFileContains ./output.properties "sonar.someArg=aValue"
28+
./test/assertFileContains ./output.properties "sonar.someArg=a value with spaces"
2829
projectBaseDirInputTest:
2930
name: >
3031
'projectBaseDir' input

entrypoint.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ if [[ "$RUNNER_DEBUG" == '1' ]]; then
2727
fi
2828

2929
unset JAVA_HOME
30-
sonar-scanner $debug_flag -Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} -Dsonar.host.url=${SONARCLOUD_URL} ${INPUT_ARGS}
30+
31+
eval "args=(${INPUT_ARGS})"
32+
sonar-scanner $debug_flag "-Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR}" "-Dsonar.host.url=${SONARCLOUD_URL}" "${args[@]}"

0 commit comments

Comments
 (0)