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 <noreply@anthropic.com>
This commit is contained in:
2026-10-05 22:28:08 +02:00
co-authored by Claude Opus 5.5
parent 873892c129
commit 15623acd09
+3 -1
View File
@@ -12,7 +12,9 @@ set -euo pipefail
target="${1:?usage: $0 <ssh-target> [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.