Compare commits

..

1 Commits

Author SHA1 Message Date
Chip Wolf ‮ f1dd0f3d71 packwiz: re-load LOAD_ENV_FROM_FILE after the installer runs (#4137) 2026-06-26 10:18:53 -05:00
3 changed files with 13 additions and 1 deletions
+2
View File
@@ -13,6 +13,8 @@ docker run -d --pull=always \
packwiz modpack definitions are processed before other mod definitions (`MODPACK`, `MODS`, etc.) to allow for additional processing/overrides you may want to perform (in case of mods not available via Modrinth/CurseForge, or you do not maintain the pack). packwiz modpack definitions are processed before other mod definitions (`MODPACK`, `MODS`, etc.) to allow for additional processing/overrides you may want to perform (in case of mods not available via Modrinth/CurseForge, or you do not maintain the pack).
If the pack ships a `.env` file that you reference with `LOAD_ENV_FROM_FILE`, that file is re-loaded immediately after the packwiz installer runs, so the freshly downloaded values are applied to the remaining startup stages. Note that `TYPE` and `VERSION` are resolved earlier (before the deploy is dispatched), so a pack-provided `.env` cannot change those from within packwiz; use `LOAD_ENV_FROM_GENERIC_PACK` or `LOAD_ENV_FROM_ARCHIVE` for those.
!!! note !!! note
packwiz is pre-configured to only download server mods. If client-side mods are downloaded and cause issues, check your pack.toml configuration, and make sure any client-only mods are not set to `"both"`, but rather `"client"` for the side configuration item. packwiz is pre-configured to only download server mods. If client-side mods are downloaded and cause issues, check your pack.toml configuration, and make sure any client-only mods are not set to `"both"`, but rather `"client"` for the side configuration item.
+10
View File
@@ -50,6 +50,16 @@ function handlePackwiz() {
logError "Failed to run packwiz installer" logError "Failed to run packwiz installer"
exit 1 exit 1
fi fi
# packwiz may have just downloaded/updated the env file referenced by
# LOAD_ENV_FROM_FILE. The initial load in start-configuration happened
# before this point, so re-load it now to pick up the pack's values for
# the remaining setup stages (server.properties, JVM args, etc.).
if [[ ${LOAD_ENV_FROM_FILE:-} ]]; then
if ! loadEnvFromFile "${LOAD_ENV_FROM_FILE}"; then
exit 1
fi
fi
fi fi
} }
+1 -1
View File
@@ -46,7 +46,7 @@ setupOnlyMinecraftTest(){
start=$(date +%s) start=$(date +%s)
status=PASSED status=PASSED
verify= verify=
if ! logs=$(docker compose run --rm -e SETUP_ONLY=true -e DEBUG="${DEBUG:-false}" -e GH_TOKEN="${GH_TOKEN:-}" mc 2>&1); then if ! logs=$(docker compose run --rm -e SETUP_ONLY=true -e DEBUG="${DEBUG:-false}" mc 2>&1); then
status=FAILED status=FAILED
outputContainerLog "$logs" outputContainerLog "$logs"
result=1 result=1