From 9c4ac2637240acd84a1d0af9718dbd304afbd4c6 Mon Sep 17 00:00:00 2001 From: Kroese Date: Tue, 7 Jul 2026 01:07:30 +0200 Subject: [PATCH] fix: Tolerate missing ESD catalog matches (#1811) --- src/mido.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mido.sh b/src/mido.sh index b38f307..59c8400 100644 --- a/src/mido.sh +++ b/src/mido.sh @@ -559,14 +559,13 @@ getESD() { error "Failed to find $xFile in $file!" && return 1 fi - local edQuery='//File[Architecture="'${PLATFORM,,}'"]'"${edition}"'' - result=$(xmllint --nonet --xpath "${edQuery}" "$dir/$xFile" 2>/dev/null) + result=$(xmllint --nonet --xpath "${edQuery}" "$dir/$xFile" 2>/dev/null || true) if [ -z "$result" ]; then edQuery='//File[Architecture="'${PLATFORM^^}'"]'"${edition}"'' - result=$(xmllint --nonet --xpath "${edQuery}" "$dir/$xFile" 2>/dev/null) + result=$(xmllint --nonet --xpath "${edQuery}" "$dir/$xFile" 2>/dev/null || true) if [ -z "$result" ]; then desc=$(printEdition "$version" "$desc") @@ -580,7 +579,7 @@ getESD() { echo "$result" >> "$dir/$fFile" echo -e ''>> "$dir/$fFile" - result=$(xmllint --nonet --xpath "//File[LanguageCode=\"${culture,,}\"]" "$dir/$fFile" 2>/dev/null) + result=$(xmllint --nonet --xpath "//File[LanguageCode=\"${culture,,}\"]" "$dir/$fFile" 2>/dev/null || true) if [ -z "$result" ]; then desc=$(printEdition "$version" "$desc")