From: Janos Gyerik Date: Fri, 12 May 2017 11:38:35 +0000 (+0200) Subject: SQSCANNER-41 Handle parentheses in script installation path (#32) X-Git-Tag: 3.0.3.778~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a0dc129477400026b0bd0c5b2b47022985e05abd;p=sonar-scanner-cli.git SQSCANNER-41 Handle parentheses in script installation path (#32) --- diff --git a/pom.xml b/pom.xml index 4f357a6..7c9340c 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.sonarsource.scanner.cli sonar-scanner-cli - 3.0.2-SNAPSHOT + 3.0.3-SNAPSHOT jar SonarQube Scanner http://docs.sonarqube.org/display/SONAR/Analyzing+with+SonarQube+Scanner 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