]> source.dussan.org Git - sonar-scanner-cli.git/commitdiff
SQSCANNER-41 Handle parentheses in script installation path (#32)
authorJanos Gyerik <janos.gyerik@sonarsource.com>
Fri, 12 May 2017 11:38:35 +0000 (13:38 +0200)
committerGitHub <noreply@github.com>
Fri, 12 May 2017 11:38:35 +0000 (13:38 +0200)
pom.xml
src/main/assembly/bin/sonar-scanner.bat

diff --git a/pom.xml b/pom.xml
index 4f357a6cf6c0e97b48a3355e78d67e9632551df7..7c9340cba3ae12f733c27ec53c5b30f4def2d381 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
 
   <groupId>org.sonarsource.scanner.cli</groupId>
   <artifactId>sonar-scanner-cli</artifactId>
-  <version>3.0.2-SNAPSHOT</version>
+  <version>3.0.3-SNAPSHOT</version>
   <packaging>jar</packaging>
   <name>SonarQube Scanner</name>
   <url>http://docs.sonarqube.org/display/SONAR/Analyzing+with+SonarQube+Scanner</url>
index b10d8dc621d03cf02484660c3ad785c3d56de71c..337fadbb9a10fccd617c3c10eeb1d266d4cf20c2 100644 (file)
@@ -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