Sonar-scanner version: 4.2.0.1873
If you place sonar-scanner in a path that has a space in it like /opt/sonar scanner/ the program will error out with “./bin/sonar-scanner: 42: export: linux/jre: bad variable name”. Because of these lines in sonar-scanner.
use_embedded_jre=true
if [ “$use_embedded_jre” = true ]; then
export JAVA_HOME=$sonar_scanner_home/jre
fi
There should be quotes around this when exporting JAVA_HOME
use_embedded_jre=true
if [ “$use_embedded_jre” = true ]; then
export JAVA_HOME="$sonar_scanner_home/jre"
fi