Skip to content

Commit

Permalink
feat: add status check after notarization
Browse files Browse the repository at this point in the history
  • Loading branch information
rcekanauskas authored Dec 19, 2023
1 parent 83f6f8e commit 5a86783
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/notarytool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ export async function notarizeAndWaitForNotaryTool(opts: NotaryToolStartOptions)
];

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

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

0 comments on commit 5a86783

Please sign in to comment.