From 1373cf75e259ec3132e780bfb8c6e4bce4fbb80d Mon Sep 17 00:00:00 2001 From: Ari Becker Date: Tue, 21 May 2024 14:50:39 +0300 Subject: [PATCH] SCSCANGHA-14 Enable debug logging when GitHub Actions debug logging is enabled (#43) --- entrypoint.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 5c26844..664602f 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -20,5 +20,11 @@ fi if [[ -z "${SONARCLOUD_URL}" ]]; then SONARCLOUD_URL="https://sonarcloud.io" fi + +debug_flag='' +if [[ "$RUNNER_DEBUG" == '1' ]]; then + debug_flag=' --debug ' +fi + unset JAVA_HOME -sonar-scanner -Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} -Dsonar.host.url=${SONARCLOUD_URL} ${INPUT_ARGS} +sonar-scanner $debug_flag -Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} -Dsonar.host.url=${SONARCLOUD_URL} ${INPUT_ARGS}