This commit is contained in:
CanbiZ
2025-10-28 14:48:23 +01:00
parent 9f7a54dfb6
commit ddcd37a419
3 changed files with 18 additions and 3 deletions

View File

@@ -2536,7 +2536,8 @@ function setup_java() {
fi
# Validate INSTALLED_VERSION is not empty if matched
if [[ -z "$INSTALLED_VERSION" && $(dpkg -l 2>/dev/null | grep -c "temurin-.*-jdk" || echo "0") -gt 0 ]]; then
local JDK_COUNT=$(dpkg -l 2>/dev/null | grep -c "temurin-.*-jdk" || echo "0")
if [[ -z "$INSTALLED_VERSION" && "$JDK_COUNT" -gt 0 ]]; then
msg_warn "Found Temurin JDK but cannot determine version"
INSTALLED_VERSION="0"
fi