mirror of
https://github.com/sonarsource/sonarcloud-github-action.git
synced 2026-06-06 07:47:09 +00:00
SCSCANGHA-16 Support passing args with spaces (#79)
This commit is contained in:
parent
a69a8edf1d
commit
d08d592c0b
2 changed files with 6 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
|
||||
uses: ./
|
||||
with:
|
||||
args: -Dsonar.someArg=aValue -Dsonar.scanner.dumpToFile=./output.properties
|
||||
args: >-
|
||||
"-Dsonar.someArg=a value with spaces" -Dsonar.scanner.dumpToFile=./output.properties
|
||||
env:
|
||||
SONAR_TOKEN: FAKE_TOKEN
|
||||
- name: Assert
|
||||
run: |
|
||||
./test/assertFileContains ./output.properties "sonar.someArg=aValue"
|
||||
./test/assertFileContains ./output.properties "sonar.someArg=a value with spaces"
|
||||
projectBaseDirInputTest:
|
||||
name: >
|
||||
'projectBaseDir' input
|
||||
|
|
|
|||
|
|
@ -27,4 +27,6 @@ if [[ "$RUNNER_DEBUG" == '1' ]]; then
|
|||
fi
|
||||
|
||||
unset JAVA_HOME
|
||||
sonar-scanner $debug_flag -Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} -Dsonar.host.url=${SONARCLOUD_URL} ${INPUT_ARGS}
|
||||
|
||||
eval "args=(${INPUT_ARGS})"
|
||||
sonar-scanner $debug_flag "-Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR}" "-Dsonar.host.url=${SONARCLOUD_URL}" "${args[@]}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue