Skip to content

Commit

Permalink
Merge pull request zaproxy#8819 from middagj/sh-fix
Browse files Browse the repository at this point in the history
Fix error when no Java version is found in zap.sh
  • Loading branch information
kingthorin authored Feb 4, 2025
2 parents c07b745 + e1e2e0d commit f8553fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zap/src/main/dist/zap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ JAVA_VERSION=$(java -version 2>&1 | awk -F\" '/version/ { print $2 }')
JAVA_MAJOR_VERSION=${JAVA_VERSION%%[.|-]*}
JAVA_MINOR_VERSION=$(echo $JAVA_VERSION | awk -F\. '{ print $2 }')

if [ $JAVA_MAJOR_VERSION -ge 11 ]; then
if [ ${JAVA_MAJOR_VERSION:-0} -ge 11 ]; then
echo "Found Java version $JAVA_VERSION"
else
echo "Exiting: ZAP requires a minimum of Java 11 to run, found $JAVA_VERSION"
Expand Down

0 comments on commit f8553fa

Please sign in to comment.