Skip to content

Update setup_minecraft_lxc.sh#72

Merged
TimInTech merged 1 commit intoTimInTech:mainfrom
Justahobby01:patch-1
May 1, 2026
Merged

Update setup_minecraft_lxc.sh#72
TimInTech merged 1 commit intoTimInTech:mainfrom
Justahobby01:patch-1

Conversation

@Justahobby01
Copy link
Copy Markdown
Contributor

@Justahobby01 Justahobby01 commented Apr 20, 2026

Fix error in jq LATEST_VERSION=

Pull Request – Simulation Only

Summary

Describe what this PR changes (scripts, docs). No commands are executed in this workspace.

Checklist

  • No commands executed locally; all steps are simulated/explained only.
  • Changes are limited to scripts and/or documentation.
  • SIMULATION.md updated to reflect behavior and risks.
  • If adding a new script or option, included example usage commands (chmod +x; ./script; screen -r ...).
  • Security considerations addressed (least-privilege user, ports, backups).

Testing (Simulation)

Explain expected side effects if run on a proper host (files created, services started, ports opened). Include rollback/cleanup notes.

Fix error in jq LATEST_VERSION=
@Justahobby01
Copy link
Copy Markdown
Contributor Author

Justahobby01 commented Apr 20, 2026

Suggested change per

#71

@TimInTech
Copy link
Copy Markdown
Owner

Thanks for the fix – the root cause is correct, .versions in the Fill v3 API returns an object, not an array, so .versions | last fails.

One concern with the current approach: keys_unsorted[0] does not reliably return the latest Minecraft version, since key order is not guaranteed. Using keys | last would give the lexicographically highest version string, which maps to the newest release in semver-style naming:

LATEST_VERSION=$(curl -fsSL -H "User-Agent: ${USER_AGENT}" "${FILL_API}" | jq -r '.versions | keys | last')

Could you update the PR accordingly?

TimInTech added a commit that referenced this pull request May 1, 2026
The Fill v3 API returns .versions as an object, not an array.
`keys | last` yields the lexicographically highest (= newest) version
reliably. Same fix as applied to setup_minecraft_lxc.sh in PR #72.
@TimInTech TimInTech merged commit 85f2c3c into TimInTech:main May 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants