From 15623acd0915c2b4d05f544e11942af773cb43cc Mon Sep 17 00:00:00 2001 From: Matzman Date: Mon, 5 Oct 2026 22:28:08 +0200 Subject: [PATCH] deploy-to-frame.sh: don't exit silently without a bundled package ls fails for the pattern that matches nothing; with pipefail and set -e the script ended without a message. Co-Authored-By: Claude Opus 5.5 --- scripts/deploy-to-frame.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/deploy-to-frame.sh b/scripts/deploy-to-frame.sh index bcc869d..83ac4ce 100755 --- a/scripts/deploy-to-frame.sh +++ b/scripts/deploy-to-frame.sh @@ -12,7 +12,9 @@ set -euo pipefail target="${1:?usage: $0 [package-dir] [remote-dir]}" root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -package="${2:-$(ls -dt "$root"/dist/*-linux-arm64 "$root"/dist/*-linux-arm64-bundled 2>/dev/null | head -1)}" +# ls fails when one of the patterns matches nothing (e.g. no bundled package); with +# pipefail that would end the script silently. +package="${2:-$(ls -dt "$root"/dist/*-linux-arm64 "$root"/dist/*-linux-arm64-bundled 2>/dev/null | head -1 || true)}" [[ -n "$package" && -x "$package/install.sh" ]] || { echo "No release package found (run scripts/package-release.sh first)" >&2; exit 1; } # Without the version: updates go to the same place and replace the old version.