Skip to content
Snippets Groups Projects
Commit c614bdd3 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

enh(jvm): Fix error message, when checking JAVA version

parent 274f252e
No related branches found
No related tags found
No related merge requests found
Pipeline #35083 failed
......@@ -74,10 +74,12 @@ if test -d "${JAVA_HOME}"; then
if test $? -ne 0 || test -z "${JAVA_VERSION}"; then
echo "No Java JRE 1.8 found in machine. This is required for Android artifacts."
else
JAVA_MAJOR_VERSION=$(echo ${JAVA_VERSION} | awk '{split($0, array, ".")} END{print array[1]}')
JAVA_MINOR_VERSION=$(echo ${JAVA_VERSION} | awk '{split($0, array, ".")} END{print array[2]}')
if ! test "${JAVA_MAJOR_VERSION}" -eq "11" || ! test "${JAVA_MINOR_VERSION}" -eq "0"; then
echo "ERROR: Require a Java SDK in version 11, but found ${JAVA_VERSION}. You can override your default JAVA_HOME in '.local/env.sh'."
if ! test "${JAVA_VERSION}" -eq "11"; then
JAVA_MAJOR_VERSION=$(echo ${JAVA_VERSION} | awk '{split($0, array, ".")} END{print array[1]}')
JAVA_MINOR_VERSION=$(echo ${JAVA_VERSION} | awk '{split($0, array, ".")} END{print array[2]}')
if ! test "${JAVA_MAJOR_VERSION}" -eq "11" || ! test "${JAVA_MINOR_VERSION}" -eq "0"; then
echo "ERROR: Require a Java SDK in version 11, but found ${JAVA_VERSION}. You can override your default JAVA_HOME in '.local/env.sh'."
fi
fi
fi
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment