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.