From d6e286d9bd5689416a11119c98284d441a1c870c Mon Sep 17 00:00:00 2001 From: Simon Mason Date: Thu, 6 Aug 2026 09:34:31 +1000 Subject: [PATCH] fix: prevent build.sh aborting when no signing identity is found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Under set -euo pipefail, the IDENTITY assignment's pipeline (security find-identity | grep | head | tr) returns exit code 1 when grep finds no matching Developer ID/Apple Development identity — the common case for anyone without a signing cert installed. This aborts the whole script immediately after 'Assembling .app bundle...' with no error message, before the ad-hoc signing fallback below ever runs. Add '|| true' so an absent identity falls through to the intended ad-hoc signing path. --- scripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index f8b63c3..5777be8 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -32,7 +32,7 @@ cp "$PROJECT_DIR/Resources/AppIcon.icns" "$APP_DIR/Contents/Resources/AppIcon.ic # revokes the grant and breaks window activation until re-granted. IDENTITY=$(security find-identity -v -p codesigning 2>/dev/null \ | grep -oE '"(Developer ID Application|Apple Development)[^"]*"' \ - | head -1 | tr -d '"') + | head -1 | tr -d '"' || true) if [ -n "$IDENTITY" ]; then echo "Signing with: $IDENTITY" # The entitlements matter: hardened runtime (--options runtime) denies