Skip to content

Commit 897a419

Browse files
committed
[OPENJDK-2736] actually fail in preflight if conditions aren't met
Signed-off-by: Jonathan Dowland <[email protected]>
1 parent d55145b commit 897a419

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/jlink/artifacts/opt/jboss/container/java/jlink/preflight.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ jlink_preflight_check()
44
if [ "$JAVA_VERSION" -lt 11 ]; then
55
echo "Jlink integration not available for JDK${JAVA_VERSION}!"
66
echo "Jlink integration is only supported for JDK versions 11 and newer."
7+
exit 1
78
fi
89
if [ ! -d /usr/lib/jvm/java/jmods ]; then
910
echo "Jlink integration requires the jmods RPM to be installed in the builder image, e.g."
1011
echo " microdnf install -y java-${JAVA_VERSION}-openjdk-jmods"
12+
exit 1
1113
fi
1214
}

0 commit comments

Comments
 (0)