Skip to content

Commit 3ffcbb3

Browse files
authored
Corrected REMOVE_OLD_MODS to process file-wise (#2317)
1 parent 2fbe2bb commit 3ffcbb3

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

scripts/start-utils

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,17 @@ eula=${EULA,,}
208208
function removeOldMods {
209209
if [ -d "$1" ]; then
210210
log "Removing old mods including:${REMOVE_OLD_MODS_INCLUDE} excluding:${REMOVE_OLD_MODS_EXCLUDE}"
211-
mc-image-helper find \
212-
--delete \
213-
--type file,directory \
214-
--min-depth=1 --max-depth "${REMOVE_OLD_MODS_DEPTH:-16}" \
215-
--name "${REMOVE_OLD_MODS_INCLUDE:-*}" \
216-
--exclude-name "${REMOVE_OLD_MODS_EXCLUDE:-}" \
217-
--quiet \
218-
"$1"
211+
args=(
212+
--delete
213+
--type file
214+
--min-depth=1 --max-depth "${REMOVE_OLD_MODS_DEPTH:-16}"
215+
--name "${REMOVE_OLD_MODS_INCLUDE:-*}"
216+
--exclude-name "${REMOVE_OLD_MODS_EXCLUDE:-}"
217+
)
218+
if ! isDebugging; then
219+
args+=(--quiet)
220+
fi
221+
mc-image-helper find "${args[@]}" "$1"
219222
fi
220223
}
221224

0 commit comments

Comments
 (0)