@electron/notarize
Advanced tools
Comparing version 2.3.1 to 2.3.2
@@ -113,14 +113,25 @@ "use strict"; | ||
const result = yield (0, spawn_1.spawn)('xcrun', notarizeArgs); | ||
const parsed = JSON.parse(result.output.trim()); | ||
if (result.code !== 0 || !parsed.status || parsed.status !== 'Accepted') { | ||
const rawOut = result.output.trim(); | ||
let parsed; | ||
try { | ||
parsed = JSON.parse(rawOut); | ||
} | ||
catch (err) { | ||
throw new Error(`Failed to notarize via notarytool. Failed with unexpected result: \n\n${rawOut}`); | ||
} | ||
if (result.code === 0 && parsed.status === 'Accepted') { | ||
d('notarization success'); | ||
return; | ||
} | ||
let logOutput; | ||
if (parsed.id) { | ||
try { | ||
if (parsed && parsed.id) { | ||
const logResult = yield (0, spawn_1.spawn)('xcrun', [ | ||
'notarytool', | ||
'log', | ||
parsed.id, | ||
...authorizationArgs(opts), | ||
]); | ||
d('notarization log', logResult.output); | ||
} | ||
const logResult = yield (0, spawn_1.spawn)('xcrun', [ | ||
'notarytool', | ||
'log', | ||
parsed.id, | ||
...authorizationArgs(opts), | ||
]); | ||
d('notarization log', logResult.output); | ||
logOutput = logResult.output; | ||
} | ||
@@ -130,5 +141,8 @@ catch (e) { | ||
} | ||
throw new Error(`Failed to notarize via notarytool\n\n${result.output}`); | ||
} | ||
d('notarization success'); | ||
let message = `Failed to notarize via notarytool\n\n${result.output}`; | ||
if (logOutput) { | ||
message += `\n\nDiagnostics from notarytool log: ${logOutput}`; | ||
} | ||
throw new Error(message); | ||
})); | ||
@@ -135,0 +149,0 @@ }); |
{ | ||
"name": "@electron/notarize", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"description": "Notarize your Electron app", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54287
717