From: Fabrice Bellingard Date: Fri, 20 Jul 2012 12:42:50 +0000 (+0000) Subject: SONARPLUGINS-1921 sonar-runner.bat fails when java.exe is found in the path but conta... X-Git-Tag: 2.5-rc1~294 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7ff1124e09a6acbb6eb9ea989cb246266c6ecdea;p=sonar-scanner-cli.git SONARPLUGINS-1921 sonar-runner.bat fails when java.exe is found in the path but contains a space --- diff --git a/src/main/assembly/bin/sonar-runner.bat b/src/main/assembly/bin/sonar-runner.bat index 6f24d89..e75cf91 100644 --- a/src/main/assembly/bin/sonar-runner.bat +++ b/src/main/assembly/bin/sonar-runner.bat @@ -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.