Skip to content

Commit

Permalink
fix: check notarytool response status (#173)
Browse files Browse the repository at this point in the history
* feat: add status check after notarization

* improve status check
  • Loading branch information
rcekanauskas committed Jan 24, 2024
1 parent 5481607 commit fa2cb22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/notarytool.ts
Expand Up @@ -76,10 +76,10 @@ export async function notarizeAndWaitForNotaryTool(opts: NotaryToolStartOptions)
];

const result = await spawn('xcrun', notarizeArgs);
const parsed = JSON.parse(result.output.trim());

if (result.code !== 0) {
if (result.code !== 0 || !parsed.status || parsed.status !== 'Accepted') {
try {
const parsed = JSON.parse(result.output.trim());
if (parsed && parsed.id) {
const logResult = await spawn('xcrun', [
'notarytool',
Expand Down

0 comments on commit fa2cb22

Please sign in to comment.