fix glob foreach (#618)

This commit is contained in:
Lime authored and GitHub committed 2026-04-01 19:11:25 -05:00
1 parent 5d73d3e70e
commit 7448d0e04d
1 file changed
+3
+3
View File
@@ -285,6 +285,8 @@ if [[ ! -f "$SERVER" ]]; then
fi fi
if [[ -n "${MC_PACK:-}" ]]; then if [[ -n "${MC_PACK:-}" ]]; then
finallyShopt="$(shopt -p nullglob || true)"
shopt -s nullglob
if [[ -d "$MC_PACK" ]]; then if [[ -d "$MC_PACK" ]]; then
srcDir="$MC_PACK" srcDir="$MC_PACK"
cleanupTmp= cleanupTmp=
@@ -374,6 +376,7 @@ if [[ -n "${MC_PACK:-}" ]]; then
fi fi
[[ -n "$cleanupTmp" ]] && rm -rf "$srcDir" [[ -n "$cleanupTmp" ]] && rm -rf "$srcDir"
fi fi
eval "$finallyShopt"
fi fi
if [[ -n "$OPS" || -n "$MEMBERS" || -n "$VISITORS" ]]; then if [[ -n "$OPS" || -n "$MEMBERS" || -n "$VISITORS" ]]; then