We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cccb49 commit b8a9bebCopy full SHA for b8a9beb
misc/tools.func
@@ -2787,8 +2787,9 @@ function setup_java() {
2787
fi
2788
2789
# Validate INSTALLED_VERSION is not empty if matched
2790
- local JDK_COUNT=$(dpkg -l 2>/dev/null | grep -c "temurin-.*-jdk" || echo "0")
2791
- if [[ -z "$INSTALLED_VERSION" && "$JDK_COUNT" -gt 0 ]]; then
+ local JDK_COUNT=0
+ JDK_COUNT=$(dpkg -l 2>/dev/null | grep -c "temurin-.*-jdk" || echo "0")
2792
+ if [[ -z "$INSTALLED_VERSION" && "${JDK_COUNT:-0}" -gt 0 ]]; then
2793
msg_warn "Found Temurin JDK but cannot determine version"
2794
INSTALLED_VERSION="0"
2795
0 commit comments