Skip to content

Commit 16be80a

Browse files
committed
SQSCANGHA-28 Support passing args with spaces
1 parent 968b486 commit 16be80a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-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_HOST_URL: http://not_actually_used
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@ fi
3737

3838
unset JAVA_HOME
3939

40-
sonar-scanner $debug_flag -Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} ${INPUT_ARGS}
40+
eval "args=(${INPUT_ARGS})"
41+
sonar-scanner $debug_flag "-Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR}" "${args[@]}"
4142

0 commit comments

Comments
 (0)