diff --git a/.changeset/twelve-boxes-film.md b/.changeset/twelve-boxes-film.md new file mode 100644 index 00000000000..e979e78ab8f --- /dev/null +++ b/.changeset/twelve-boxes-film.md @@ -0,0 +1,5 @@ +--- +"app-builder-lib": patch +--- + +fix(mac): only skip notarization step when `notarize` is explicitly false diff --git a/packages/app-builder-lib/src/macPackager.ts b/packages/app-builder-lib/src/macPackager.ts index 2d84ca8dfcd..5c1a56c4eb3 100644 --- a/packages/app-builder-lib/src/macPackager.ts +++ b/packages/app-builder-lib/src/macPackager.ts @@ -498,12 +498,13 @@ export default class MacPackager extends PlatformPackager { private async notarizeIfProvided(appPath: string, buildOptions: MacConfiguration) { const notarizeOptions = buildOptions.notarize - if (!notarizeOptions) { - log.info({ reason: "`notarize` options were not provided" }, "skipped macOS notarization") + if (notarizeOptions === false) { + log.info({ reason: "`notarize` options were set explicitly `false`" }, "skipped macOS notarization") return } const options = this.getNotarizeOptions(appPath) if (!options) { + log.warn({ reason: "`notarize` options were unable to be generated" }, "skipped macOS notarization") return } await notarize(options) @@ -561,7 +562,7 @@ export default class MacPackager extends PlatformPackager { } return proj } - const { teamId } = options as NotarizeNotaryOptions + const teamId = (options as NotarizeNotaryOptions)?.teamId if ((teamId || options === true) && (legacyLogin || notaryToolLogin)) { const proj: NotaryToolStartOptions = { appPath,