diff --git a/tools/desktop-release.ts b/tools/desktop-release.ts index 72252ab..2872790 100644 --- a/tools/desktop-release.ts +++ b/tools/desktop-release.ts @@ -456,7 +456,7 @@ async function mac(argv: string[]): Promise { say('notarytool submit (DMG), waiting for Apple'); const n = run(['xcrun', 'notarytool', 'submit', dmg, '--key', notary!.APPLE_API_KEY_PATH!, '--key-id', notary!.APPLE_API_KEY!, '--issuer', notary!.APPLE_API_ISSUER!, '--wait', '--output-format', 'json'], { allowFail: true, timeout: 3_600_000 }); const status = (() => { try { return (JSON.parse(n.out) as { status?: string }).status; } catch { return undefined; } })(); - if (status !== 'Accepted') fail(`notarization of the DMG: ${status ?? n.err.trim()}`); + if (status !== 'Accepted') fail(`notarization of the DMG: ${status ?? (n.err.trim() || n.out.trim() || `notarytool exited ${n.code} without an answer (killed or timed out): run again; xcrun notarytool history shows the submission`)}`); run(['xcrun', 'stapler', 'staple', dmg]); run(['xcrun', 'stapler', 'validate', dmg]); }