Skip to content

Commit 6826664

Browse files
committed
Update notarize-macos.yml
1 parent 20cccfa commit 6826664

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/notarize-macos.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,21 @@ jobs:
9696
--apple-id "$APPLE_ID" \
9797
--team-id "$APPLE_TEAM_ID" \
9898
--password "$APPLE_APP_PASSWORD" \
99-
--output-format json || true)"
100-
101-
STATUS="$(echo "$LOG_JSON" | /usr/bin/python3 -c "import sys,json; print(json.load(sys.stdin).get('status', 'Unknown'))")"
99+
--output-format json 2>/dev/null || true)"
100+
101+
STATUS="$(echo "$LOG_JSON" | /usr/bin/python3 - <<'PY'
102+
import json,sys
103+
data=sys.stdin.read().strip()
104+
if not data:
105+
print("Pending")
106+
sys.exit(0)
107+
try:
108+
payload=json.loads(data)
109+
print(payload.get("status","Pending"))
110+
except json.JSONDecodeError:
111+
print("Pending")
112+
PY
113+
)"
102114
echo "Notarization status ($ATTEMPT/$MAX_ATTEMPTS): $STATUS"
103115

104116
if [ "$STATUS" = "Accepted" ]; then

0 commit comments

Comments
 (0)