From 149e5920791741c9af8ec9e277576988cb1ee949 Mon Sep 17 00:00:00 2001 From: Duarte Meneses Date: Fri, 21 Aug 2015 14:28:59 +0200 Subject: [PATCH] SONARUNNER-117 If JAVA_HOME is set, use it in the sonar-runner executable --- sonar-runner-cli/src/main/assembly/bin/sonar-runner | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sonar-runner-cli/src/main/assembly/bin/sonar-runner b/sonar-runner-cli/src/main/assembly/bin/sonar-runner index b0506e5..5529717 100755 --- a/sonar-runner-cli/src/main/assembly/bin/sonar-runner +++ b/sonar-runner-cli/src/main/assembly/bin/sonar-runner @@ -85,7 +85,13 @@ if [ ! -f "$SONAR_RUNNER_HOME/lib/sonar-runner-dist-${project.version}.jar" ] ; exit 1 fi -JAVA_CMD="`which java`" +if [ -n "$JAVA_HOME" ] +then + JAVA_CMD="$JAVA_HOME/bin/java" +else + JAVA_CMD="`which java`" +fi + JAR_FILE="${SONAR_RUNNER_HOME}"/lib/sonar-runner-dist-${project.version}.jar PROJECT_HOME=`pwd` -- 2.39.5