Skip to content

Commit 6aaed2d

Browse files
authored
Disable REMOVE_OLD_MODS when it interferes with managed mod/plugin features (#2648)
1 parent 15c2e21 commit 6aaed2d

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

scripts/start-deployAutoCF

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ resultsFile=/data/.install-curseforge.env
2424

2525
isDebugging && set -x
2626

27+
ensureRemoveAllModsOff "MOD_PLATFORM=AUTO_CURSEFORGE"
28+
2729
args=(
2830
--results-file="$resultsFile"
2931
)

scripts/start-deployModrinth

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ fi
1919

2020
isDebugging && set -x
2121

22+
ensureRemoveAllModsOff "MOD_PLATFORM=MODRINTH"
23+
2224
args=(
2325
--results-file="$resultsFile"
2426
--project="${MODRINTH_MODPACK}"

scripts/start-setupModpack

+8
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ fi
8383
function handleListings() {
8484
if usesMods && usesPlugins; then
8585
if [[ "$MODS" ]]; then
86+
87+
ensureRemoveAllModsOff "MODS is set"
88+
8689
mkdir -p "$MODS_OUT_DIR"
8790
mc-image-helper mcopy \
8891
--glob=*.jar \
@@ -91,6 +94,7 @@ function handleListings() {
9194
"$MODS"
9295
fi
9396
if [[ "$PLUGINS" ]]; then
97+
ensureRemoveAllModsOff "PLUGINS is set"
9498
mkdir -p "$PLUGINS_OUT_DIR"
9599
mc-image-helper mcopy \
96100
--glob=*.jar \
@@ -100,6 +104,7 @@ function handleListings() {
100104
fi
101105

102106
if [[ "$MODS_FILE" ]]; then
107+
ensureRemoveAllModsOff "MODS_FILE is set"
103108
mkdir -p "$MODS_OUT_DIR"
104109
mc-image-helper mcopy \
105110
--file-is-listing \
@@ -108,6 +113,7 @@ function handleListings() {
108113
"$MODS_FILE"
109114
fi
110115
if [[ "$PLUGINS_FILE" ]]; then
116+
ensureRemoveAllModsOff "PLUGINS_FILE is set"
111117
mkdir -p "$PLUGINS_OUT_DIR"
112118
mc-image-helper mcopy \
113119
--file-is-listing \
@@ -123,6 +129,7 @@ function handleListings() {
123129
fi
124130

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

134141
if [[ "$MODS_FILE" || "$PLUGINS_FILE" ]]; then
142+
ensureRemoveAllModsOff "MODS_FILE or PLUGINS_FILE is set"
135143
mkdir -p "$outDir"
136144
mc-image-helper mcopy \
137145
--file-is-listing \

scripts/start-utils

+9
Original file line numberDiff line numberDiff line change
@@ -347,4 +347,13 @@ function resolveFamily() {
347347
;;
348348
esac
349349
export FAMILY
350+
}
351+
352+
function ensureRemoveAllModsOff() {
353+
reason=${1?}
354+
355+
if isTrue "${REMOVE_OLD_MODS:-false}"; then
356+
log "WARNING using REMOVE_OLDS_MODS interferes with $reason -- it is now disabled"
357+
REMOVE_OLD_MODS=false
358+
fi
350359
}

0 commit comments

Comments
 (0)