Install Neoforge from a local file (#3918)

Co-authored-by: Geoff Bourne <itzgeoff@gmail.com>
This commit is contained in:
Máté Farkas
2026-02-09 23:19:04 +01:00
committed by GitHub
parent 6e05807865
commit 796849f9d8
2 changed files with 11 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
: "${NEOFORGE_VERSION:=latest}"
: "${NEOFORGE_FORCE_REINSTALL:=false}}"
: "${NEOFORGE_INSTALLER:=}"
# shellcheck source=start-utils
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
@@ -9,14 +10,19 @@ isDebugging && set -x
resultsFile=/data/.run-neoforge.env
if ! mc-image-helper install-neoforge \
if [[ ${NEOFORGE_INSTALLER} ]]; then
if ! mc-image-helper install-neoforge --neoforge-installer="${NEOFORGE_INSTALLER}" --output-directory=/data --results-file=${resultsFile} --minecraft-version="${VERSION}" --force-reinstall="${NEOFORGE_FORCE_REINSTALL}"; then
logError "Failed to installForge given installer ${NEOFORGE_INSTALLER}"
exit 1
fi
elif ! mc-image-helper install-neoforge \
--output-directory=/data \
--results-file=${resultsFile} \
--minecraft-version="${VERSION}" \
--neoforge-version="${NEOFORGE_VERSION}" \
--force-reinstall="${NEOFORGE_FORCE_REINSTALL}"; then
logError "Failed to install NeoForge"
exit 1
logError "Failed to install NeoForge"
exit 1
fi
applyResultsFile ${resultsFile}