mirror of
https://github.com/SonarSource/sonarqube-scan-action.git
synced 2025-12-12 17:31:15 +00:00
SQSCANGHA-28 Support passing args with spaces
This commit is contained in:
parent
968b486245
commit
16be80a080
2 changed files with 5 additions and 3 deletions
5
.github/workflows/qa.yml
vendored
5
.github/workflows/qa.yml
vendored
|
|
@ -19,12 +19,13 @@ jobs:
|
||||||
- name: Run action with args
|
- name: Run action with args
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
args: -Dsonar.someArg=aValue -Dsonar.scanner.dumpToFile=./output.properties
|
args: >-
|
||||||
|
"-Dsonar.someArg=a value with spaces" -Dsonar.scanner.dumpToFile=./output.properties
|
||||||
env:
|
env:
|
||||||
SONAR_HOST_URL: http://not_actually_used
|
SONAR_HOST_URL: http://not_actually_used
|
||||||
- name: Assert
|
- name: Assert
|
||||||
run: |
|
run: |
|
||||||
./test/assertFileContains ./output.properties "sonar.someArg=aValue"
|
./test/assertFileContains ./output.properties "sonar.someArg=a value with spaces"
|
||||||
projectBaseDirInputTest:
|
projectBaseDirInputTest:
|
||||||
name: >
|
name: >
|
||||||
'projectBaseDir' input
|
'projectBaseDir' input
|
||||||
|
|
|
||||||
|
|
@ -37,5 +37,6 @@ fi
|
||||||
|
|
||||||
unset JAVA_HOME
|
unset JAVA_HOME
|
||||||
|
|
||||||
sonar-scanner $debug_flag -Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} ${INPUT_ARGS}
|
eval "args=(${INPUT_ARGS})"
|
||||||
|
sonar-scanner $debug_flag "-Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR}" "${args[@]}"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue