From 6233599f2894ebd12ac5990c71f989909c44abeb Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 19 Jul 2026 00:48:05 +0200 Subject: [PATCH] feat: Allow EDITION to override the automatic selection (#1888) --- src/install.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/install.sh b/src/install.sh index 774eb91c..4877f36f 100644 --- a/src/install.sh +++ b/src/install.sh @@ -697,6 +697,20 @@ selectVersion() { id=$(fromName "$name" "$platform") [ -z "$id" ] && warn "Unknown ${tag,,}: '$name'" && return 0 + if [ -n "$EDITION" ] && [[ "$id" != win20* ]]; then + case "${EDITION,,}" in + "pro" | "professional" | "business" ) prefer="$id" ;; + * ) prefer="$id-${EDITION,,}" ;; + esac + + if hasVersion "$prefer" "$tag" "$xml"; then + echo "$prefer" + return 0 + fi + + warn "Edition '$EDITION' is not supported by this image, using automatic selection instead." + fi + prefer="$id-enterprise" hasVersion "$prefer" "$tag" "$xml" && echo "$prefer" && return 0