feat: Allow EDITION to override the automatic selection (#1888)

This commit is contained in:
Kroese
2026-07-19 00:48:05 +02:00
committed by GitHub
parent 9409c06e32
commit 6233599f28
+14
View File
@@ -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