From c1cfe73a71443c1447a1840b627d0f96c8ab68bf Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 2 Jan 2026 08:45:54 +0100 Subject: [PATCH] GH/scripts/environment.sh: add -o pipefail Try to set -o pipefail. The option should be supported since POSIX v8 (2024). Of course it is supported by shells like bash/zsh long time ago but it was added to dash [here], which is merged to dash 5.13, so it is not in any Ubuntu version yet. So adding '|| true' to suppress omission. XIMEA URL extraction must have been updated 'sed -e "... q"' causes broken pipe, which becomes now fatal. [here]: https://git.kernel.org/pub/scm/utils/dash/dash.git/commit/?id=6347b9fc52d742f36a0276cdea06cd9ad1f02c77 --- .github/scripts/environment.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/scripts/environment.sh b/.github/scripts/environment.sh index 792eb00e5..9f8ad86d0 100644 --- a/.github/scripts/environment.sh +++ b/.github/scripts/environment.sh @@ -10,6 +10,7 @@ ## password $KEY_FILE_PASS) set -eu +set -o pipefail || true if expr "$GITHUB_REF" : 'refs/tags/' >/dev/null; then TAG=${GITHUB_REF#refs/tags/} @@ -155,7 +156,7 @@ set_ximea_url() { ximea_path=$(curl -f https://www.ximea.com/software-downloads | grep -v 35adfeed-8e15-4b4d-8364-bd5a65cba5c4 | sed -n "/$ximea_pattern/"\ -' { s-^.*\(/getattachment[^"]*\).*$-\1-; p; q; }') +' { s-^.*\(/getattachment[^"]*\).*$-\1-; p; }' | head -n 1) XIMEA_DOWNLOAD_URL=https://www.ximea.com$ximea_path export XIMEA_DOWNLOAD_URL printf "XIMEA_DOWNLOAD_URL=%s\n" "$XIMEA_DOWNLOAD_URL" >> "$GITHUB_ENV"