diff --git a/cleanup.sh b/cleanup.sh index 72d5f41..8a5e4c9 100644 --- a/cleanup.sh +++ b/cleanup.sh @@ -10,5 +10,5 @@ fi _tmp_file=$(ls "${INPUT_PROJECTBASEDIR}/" | head -1) PERM=$(stat -c "%u:%g" "${INPUT_PROJECTBASEDIR}/$_tmp_file") -chown -R $PERM "${INPUT_PROJECTBASEDIR}/.scannerwork/" +chown -R "$PERM" "${INPUT_PROJECTBASEDIR}/.scannerwork/" diff --git a/entrypoint.sh b/entrypoint.sh index 9cd1c40..debeead 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -21,10 +21,10 @@ if [[ -z "${SONARCLOUD_URL}" ]]; then SONARCLOUD_URL="https://sonarcloud.io" fi -debug_flag='' -if [[ "$RUNNER_DEBUG" == '1' ]]; then - debug_flag=' --debug ' -fi + +debug="" +[[ "$RUNNER_DEBUG" == '1' ]] && debug="yes" unset JAVA_HOME -sonar-scanner $debug_flag -Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} -Dsonar.host.url=${SONARCLOUD_URL} ${INPUT_ARGS} + +sonar-scanner ${debug:+"--debug"} -Dsonar.projectBaseDir="${INPUT_PROJECTBASEDIR}" -Dsonar.host.url="${SONARCLOUD_URL}" "${INPUT_ARGS}"