]> source.dussan.org Git - sonar-scanner-cli.git/commitdiff
SONARPLUGINS-1921 sonar-runner.bat fails when java.exe is found in the path but conta...
authorFabrice Bellingard <bellingard@gmail.com>
Fri, 20 Jul 2012 12:42:50 +0000 (12:42 +0000)
committerFabrice Bellingard <bellingard@gmail.com>
Fri, 20 Jul 2012 12:42:50 +0000 (12:42 +0000)
src/main/assembly/bin/sonar-runner.bat

index 6f24d8981697426b1f85ba4522a8833a041a9d88..e75cf9153512cf63aecfae166f09ee5c7482d708 100644 (file)
@@ -16,6 +16,11 @@ if not "%JAVA_HOME%" == "" goto foundJavaHome
 
 for %%i in (java.exe) do set JAVA_EXEC=%%~$PATH:i
 
+if not "%JAVA_EXEC%" == "" {
+  set JAVA_EXEC="%JAVA_EXEC%"
+  goto OkJava
+}
+
 if not "%JAVA_EXEC%" == "" goto OkJava
 
 echo.