aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMozes Gaal <mgaal@chemaxon.com>2019-02-22 14:24:21 +0100
committerJanos Gyerik <janos.gyerik@sonarsource.com>2019-02-22 17:46:26 +0100
commit7d46ea49284083dbae03f2a0f2ad4b4247509f17 (patch)
treeb61e9b8632ee83af624080eae170fe24757e6278 /src
parent0c6ddb258c3936c19995e9247656d95d8c9e80b4 (diff)
downloadsonar-scanner-cli-7d46ea49284083dbae03f2a0f2ad4b4247509f17.tar.gz
sonar-scanner-cli-7d46ea49284083dbae03f2a0f2ad4b4247509f17.zip
Check if Java is installed on Linux
Diffstat (limited to 'src')
-rwxr-xr-xsrc/main/assembly/bin/sonar-scanner5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/assembly/bin/sonar-scanner b/src/main/assembly/bin/sonar-scanner
index dc9d263..fefac84 100755
--- a/src/main/assembly/bin/sonar-scanner
+++ b/src/main/assembly/bin/sonar-scanner
@@ -49,6 +49,11 @@ else
java_cmd="$(which java)"
fi
+if [ -z "$java_cmd" -o ! -x "$java_cmd" ] ; then
+ echo "Could not find 'java' executable in JAVA_HOME or PATH."
+ exit 1
+fi
+
project_home=$(pwd)
#echo "Info: Using sonar-scanner at $sonar_scanner_home"