Exit early on failed GTNH packs retrieval (#3931)

This commit is contained in:
Andre Blanke
2026-02-15 20:20:18 +01:00
committed by GitHub
parent cca86e6a3d
commit 4c0fd104c6

View File

@@ -8,10 +8,11 @@ function getGTNHdownloadPath(){
gtnh_download_path=""
current_java_version=$(mc-image-helper java-release)
if ! mapfile -t packs < <(curl -sfL 'http://downloads.gtnewhorizons.com/ServerPacks/?raw'); then
if ! packs_data="$(curl -sfL 'http://downloads.gtnewhorizons.com/ServerPacks/?raw')"; then
logError "Failed to retrieve data from http://downloads.gtnewhorizons.com/ServerPacks/?raw"
exit 1
fi
mapfile -t packs <<< "$packs_data"
log "Start locating server files..."
for pack in "${packs[@]}"; do