Skip to content

Commit

Permalink
Check if jq is installed and cancel with message on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
danaak committed Nov 1, 2018
1 parent 33f9998 commit 91dd313
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions init/msm
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,14 @@ jargroup_getlatest() {
if [[ "$target" == "minecraft-snapshot" ]]; then
local versions_target="snapshot"
fi

# Check if jq is installed on the local computer
as_user "$SETTINGS_USERNAME" "which jq > /dev/null"
if [[ "$?" != "0" ]]; then
echo "jq is required to download server updates. Please ensure it is installed and the path is set correctly."
return 1
fi

printf "Checking minecraft version JSON... "
local versions_url="https://launchermeta.mojang.com/mc/game/version_manifest.json"
local versions_file="/tmp/minecraft_versions.json"
Expand Down

0 comments on commit 91dd313

Please sign in to comment.