From 417bcdac6c7c126bb4ac482887723ecc618c8dff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=3D=3DTIM=2E=C2=A9=2EB=20=20=3D=3D?= Date: Fri, 1 May 2026 09:13:44 +0200 Subject: [PATCH] fix: use .versions | keys | last for deterministic latest MC version The Fill v3 API returns .versions as an object (keys = MC version strings), not an array. Using `keys | last` yields the lexicographically highest (= newest) version reliably. Fixes broken `.versions | last` (was null on object input) and the non-deterministic `keys_unsorted[0]` variant. --- setup_minecraft_lxc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 setup_minecraft_lxc.sh diff --git a/setup_minecraft_lxc.sh b/setup_minecraft_lxc.sh old mode 100755 new mode 100644 index 8a24cf4..0a0d72b --- a/setup_minecraft_lxc.sh +++ b/setup_minecraft_lxc.sh @@ -45,7 +45,7 @@ fi # ── Download latest stable PaperMC via Fill v3 API ── FILL_API="https://fill.papermc.io/v3/projects/paper" -LATEST_VERSION=$(curl -fsSL -H "User-Agent: ${USER_AGENT}" "${FILL_API}" | jq -r '.versions | last') +LATEST_VERSION=$(curl -fsSL -H "User-Agent: ${USER_AGENT}" "${FILL_API}" | jq -r '.versions | keys | last') echo "Latest Minecraft version: ${LATEST_VERSION}" BUILDS_JSON=$(curl -fsSL -H "User-Agent: ${USER_AGENT}" "${FILL_API}/versions/${LATEST_VERSION}/builds")