From ca852345a147d213eaec8ac9e5f86b114c63e2d4 Mon Sep 17 00:00:00 2001 From: Radu Ursache Date: Sat, 21 Feb 2026 15:02:07 +0200 Subject: [PATCH] Fix MPQ detection failing when files are lowercase .mpq The sanity check `ls *.MPQ *.mpq` fails under `set -o pipefail` when only one case variant exists, because ls exits non-zero for the unmatched glob pattern and pipefail propagates that failure. Use `compgen -G` to check each glob pattern independently instead. Co-Authored-By: Claude Opus 4.6 --- extract_assets.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extract_assets.sh b/extract_assets.sh index 403407aa..5c7b6282 100755 --- a/extract_assets.sh +++ b/extract_assets.sh @@ -54,7 +54,7 @@ if [ -d "${OUTPUT_DIR}/expansions" ]; then fi # Quick sanity check: look for any .MPQ files -if ! ls "$MPQ_DIR"/*.MPQ "$MPQ_DIR"/*.mpq 2>/dev/null | head -1 > /dev/null 2>&1; then +if ! compgen -G "$MPQ_DIR"/*.MPQ > /dev/null 2>&1 && ! compgen -G "$MPQ_DIR"/*.mpq > /dev/null 2>&1; then echo "Error: No .MPQ files found in: $MPQ_DIR" echo "Make sure this is the WoW Data/ directory (not the WoW root)." exit 1