Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable REMOVE_OLD_MODS when it interferes with managed mod/plugin features #2648

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scripts/start-deployAutoCF
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ resultsFile=/data/.install-curseforge.env

isDebugging && set -x

ensureRemoveAllModsOff "MOD_PLATFORM=AUTO_CURSEFORGE"

args=(
--results-file="$resultsFile"
)
Expand Down
2 changes: 2 additions & 0 deletions scripts/start-deployModrinth
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ fi

isDebugging && set -x

ensureRemoveAllModsOff "MOD_PLATFORM=MODRINTH"

args=(
--results-file="$resultsFile"
--project="${MODRINTH_MODPACK}"
Expand Down
8 changes: 8 additions & 0 deletions scripts/start-setupModpack
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ fi
function handleListings() {
if usesMods && usesPlugins; then
if [[ "$MODS" ]]; then

ensureRemoveAllModsOff "MODS is set"

mkdir -p "$MODS_OUT_DIR"
mc-image-helper mcopy \
--glob=*.jar \
Expand All @@ -91,6 +94,7 @@ function handleListings() {
"$MODS"
fi
if [[ "$PLUGINS" ]]; then
ensureRemoveAllModsOff "PLUGINS is set"
mkdir -p "$PLUGINS_OUT_DIR"
mc-image-helper mcopy \
--glob=*.jar \
Expand All @@ -100,6 +104,7 @@ function handleListings() {
fi

if [[ "$MODS_FILE" ]]; then
ensureRemoveAllModsOff "MODS_FILE is set"
mkdir -p "$MODS_OUT_DIR"
mc-image-helper mcopy \
--file-is-listing \
Expand All @@ -108,6 +113,7 @@ function handleListings() {
"$MODS_FILE"
fi
if [[ "$PLUGINS_FILE" ]]; then
ensureRemoveAllModsOff "PLUGINS_FILE is set"
mkdir -p "$PLUGINS_OUT_DIR"
mc-image-helper mcopy \
--file-is-listing \
Expand All @@ -123,6 +129,7 @@ function handleListings() {
fi

if [[ "$MODS" || "$PLUGINS" ]]; then
ensureRemoveAllModsOff "MODS or PLUGINS is set"
mkdir -p "$outDir"
mc-image-helper mcopy \
--glob=*.jar \
Expand All @@ -132,6 +139,7 @@ function handleListings() {
fi

if [[ "$MODS_FILE" || "$PLUGINS_FILE" ]]; then
ensureRemoveAllModsOff "MODS_FILE or PLUGINS_FILE is set"
mkdir -p "$outDir"
mc-image-helper mcopy \
--file-is-listing \
Expand Down
9 changes: 9 additions & 0 deletions scripts/start-utils
Original file line number Diff line number Diff line change
Expand Up @@ -347,4 +347,13 @@ function resolveFamily() {
;;
esac
export FAMILY
}

function ensureRemoveAllModsOff() {
reason=${1?}

if isTrue "${REMOVE_OLD_MODS:-false}"; then
log "WARNING using REMOVE_OLDS_MODS interferes with $reason -- it is now disabled"
REMOVE_OLD_MODS=false
fi
}