From b90e9fecf02f0dd78b44190f9a2616f8bd305f24 Mon Sep 17 00:00:00 2001 From: Ari Becker Date: Sun, 5 Feb 2023 19:51:39 +0200 Subject: [PATCH] Enable debug logging when GitHub Actions debug logging is enabled --- 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}