aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application
diff options
context:
space:
mode:
authorJose C <luqq@users.noreply.github.com>2022-09-14 09:38:49 +0200
committersonartech <sonartech@sonarsource.com>2022-09-27 20:03:17 +0000
commit525f26c2c9818bc3a59a5452fb505fe4103e5c8a (patch)
treee4c6a841ed57821b72f057e7dc6b3aaa0037d0bd /sonar-application
parentd07ba86a6bbc81ecdb9ec7220d663f6797f869ef (diff)
downloadsonarqube-525f26c2c9818bc3a59a5452fb505fe4103e5c8a.tar.gz
sonarqube-525f26c2c9818bc3a59a5452fb505fe4103e5c8a.zip
Fix SonarService.bat for supporting folders with names including spaces
When %REALPATH% had a folder with whitespaces, e.g. c:\program files\sonarqube, it showed a nasty powershell error
Diffstat (limited to 'sonar-application')
-rw-r--r--sonar-application/src/main/assembly/bin/windows-x86-64/SonarService.bat2
1 files changed, 1 insertions, 1 deletions
diff --git a/sonar-application/src/main/assembly/bin/windows-x86-64/SonarService.bat b/sonar-application/src/main/assembly/bin/windows-x86-64/SonarService.bat
index ae7fb2672d6..38d8860a1d4 100644
--- a/sonar-application/src/main/assembly/bin/windows-x86-64/SonarService.bat
+++ b/sonar-application/src/main/assembly/bin/windows-x86-64/SonarService.bat
@@ -26,7 +26,7 @@ rem check if Java is found
set JAVA_EXE=
call "%REALPATH%lib\find_java.bat" set_java_exe FAIL || goto:eof
rem replace JAVA_EXE with the Java path in configuration file
-powershell -Command "(Get-Content %REALPATH%lib\SonarServiceWrapperTemplate.xml) -replace 'JAVA_EXE', '%JAVA_EXE%' | Out-File -encoding ASCII %REALPATH%lib\SonarServiceWrapper.xml"
+powershell -Command "(Get-Content '%REALPATH%lib\SonarServiceWrapperTemplate.xml') -replace 'JAVA_EXE', '%JAVA_EXE%' | Out-File -encoding ASCII '%REALPATH%lib\SonarServiceWrapper.xml'"
rem call the SonarServiceWrapper.exe passing all the parameters
"%REALPATH%lib\SonarServiceWrapper.exe" %*