diff options
author | Janos Gyerik <janos.gyerik@sonarsource.com> | 2017-05-12 13:38:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-12 13:38:35 +0200 |
commit | a0dc129477400026b0bd0c5b2b47022985e05abd (patch) | |
tree | b3e46a748710e654a034c301bedb2bf5f3bf758d /src/main/assembly/bin/sonar-scanner.bat | |
parent | e77dce4b8225466ec84da17df70d00ade58d7ebd (diff) | |
download | sonar-scanner-cli-a0dc129477400026b0bd0c5b2b47022985e05abd.tar.gz sonar-scanner-cli-a0dc129477400026b0bd0c5b2b47022985e05abd.zip |
SQSCANNER-41 Handle parentheses in script installation path (#32)
Diffstat (limited to 'src/main/assembly/bin/sonar-scanner.bat')
-rw-r--r-- | src/main/assembly/bin/sonar-scanner.bat | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/assembly/bin/sonar-scanner.bat b/src/main/assembly/bin/sonar-scanner.bat index b10d8dc..337fadb 100644 --- a/src/main/assembly/bin/sonar-scanner.bat +++ b/src/main/assembly/bin/sonar-scanner.bat @@ -13,14 +13,16 @@ set ERROR_CODE=0 @REM set local scope for the variables with windows NT shell @setlocal -set SONAR_SCANNER_HOME=%~dp0.. +set "scriptdir=%~dp0" +if #%scriptdir:~-1%# == #\# set scriptdir=%scriptdir:~0,-1% +set "SONAR_SCANNER_HOME=%scriptdir%\.." @REM ==== START VALIDATION ==== @REM *** JAVA EXEC VALIDATION *** set use_embedded_jre=${use_embedded_jre} if "%use_embedded_jre%" == "true" ( - set JAVA_HOME=%SONAR_SCANNER_HOME%\jre + set "JAVA_HOME=%SONAR_SCANNER_HOME%\jre" ) if not "%JAVA_HOME%" == "" goto foundJavaHome |