Just exit container when PATH is mismatched

This commit is contained in:
Geoff Bourne
2022-01-28 22:21:07 -06:00
parent 90e7e3e2be
commit 9b4fd48244
2 changed files with 6 additions and 2 deletions

View File

@@ -94,6 +94,7 @@ jobs:
tags: ${{ env.IMAGE_TO_TEST }}
# ensure latest base image is used
pull: true
# load into daemon for test usage in next step
load: true
push: false
build-args: |

View File

@@ -66,9 +66,12 @@ if [[ $RCON_PASSWORD_FILE ]]; then
log ""
fi
# Some Docker management UIs grab all the image declared variables and present them for configuration.
# When upgrading images across Java versions, that creates a mismatch in PATH's expected by base image.
if ! which java > /dev/null; then
log "Fixing PATH to include java"
PATH="${PATH}:/opt/java/openjdk/bin"
log "ERROR: PATH should not be explicitly passed into the container"
log " Remove configuration of that variable."
exit 1
fi
export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json