From b6c74aa4d5d0c2de1d5c783aadfd88f8a89be9e2 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Thu, 8 Aug 2024 12:33:44 +0200 Subject: [PATCH] chore(ci): fix 'basename: missing operand' error when device has not firmware released yet --- scripts/check-firmware-presence-in-releases-json.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check-firmware-presence-in-releases-json.sh b/scripts/check-firmware-presence-in-releases-json.sh index 8f89552..fb2834a 100755 --- a/scripts/check-firmware-presence-in-releases-json.sh +++ b/scripts/check-firmware-presence-in-releases-json.sh @@ -21,7 +21,7 @@ extract_filenames_from_json() { # a) 'null' from missing .url_bitcoinonly for older firmwares # b) super-old firmwares - jq -r '.[] | select(.url) | .url, .url_bitcoinonly' "$json_file" | xargs -n 1 basename | sort | uniq \ + jq -r '.[] | select(.url) | .url, .url_bitcoinonly' "$json_file" | xargs -n1 --no-run-if-empty basename | sort | uniq \ | grep -vF "null" }