diff options
-rw-r--r-- | src/main/assembly/bin/sonar-runner.bat | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/assembly/bin/sonar-runner.bat b/src/main/assembly/bin/sonar-runner.bat index 2d2b80a..10131fd 100644 --- a/src/main/assembly/bin/sonar-runner.bat +++ b/src/main/assembly/bin/sonar-runner.bat @@ -21,9 +21,12 @@ echo. goto end :OkJavaHome -if NOT "%SONAR_RUNNER_HOME%"=="" goto run -set SONAR_RUNNER_HOME=%~dp0.. - +if NOT "%SONAR_RUNNER_HOME%"=="" ( + @REM If the property has a trailing backslash, remove it + if %SONAR_RUNNER_HOME:~-1%==\ set SONAR_RUNNER_HOME=%SONAR_RUNNER_HOME:~0,-1% +) else ( + set SONAR_RUNNER_HOME=%~dp0.. +) @REM ==== START RUN ==== :run |