Skip to content

Commit

Permalink
chore(hadron-build): make macnotary errors more verbose (#5805)
Browse files Browse the repository at this point in the history
These errors can be quite large, so make sure relevant information does not end up
being truncated away.
  • Loading branch information
addaleax committed May 13, 2024
1 parent 596d6eb commit 62dc601
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/hadron-build/lib/mac-notary-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const download = require('download');
const path = require('path');
const { promises: fs } = require('fs');
const debug = require('debug')('hadron-build:macos-notarization');
const { promisify } = require('util');
const { promisify, inspect } = require('util');
const childProcess = require('child_process');
const execFile = promisify(childProcess.execFile);

Expand Down Expand Up @@ -77,6 +77,11 @@ async function notarize(src, notarizeOptions) {
await execFile('rm', ['-r', fileName], execOpts);
debug(`unzipping with "unzip -u ${signedArchive}"`);
await execFile('unzip', ['-u', signedArchive], execOpts);
} catch (err) {
debug('full macnotary error output', inspect(err, {
maxArrayLength: Infinity,
maxStringLength: Infinity
}));
} finally {
// cleanup - remove signedArchive and unsignedArchive
debug('ls', (await execFile('ls', ['-lh'], execOpts)).stdout);
Expand Down

0 comments on commit 62dc601

Please sign in to comment.