Skip to content

Commit 5681777

Browse files
authored
fix(mac): only skip notarization step when notarize is explicitly false (electron-userland#8065)
1 parent 8f4acff commit 5681777

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.changeset/twelve-boxes-film.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": patch
3+
---
4+
5+
fix(mac): only skip notarization step when `notarize` is explicitly false

packages/app-builder-lib/src/macPackager.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -498,12 +498,13 @@ export default class MacPackager extends PlatformPackager<MacConfiguration> {
498498

499499
private async notarizeIfProvided(appPath: string, buildOptions: MacConfiguration) {
500500
const notarizeOptions = buildOptions.notarize
501-
if (!notarizeOptions) {
502-
log.info({ reason: "`notarize` options were not provided" }, "skipped macOS notarization")
501+
if (notarizeOptions === false) {
502+
log.info({ reason: "`notarize` options were set explicitly `false`" }, "skipped macOS notarization")
503503
return
504504
}
505505
const options = this.getNotarizeOptions(appPath)
506506
if (!options) {
507+
log.warn({ reason: "`notarize` options were unable to be generated" }, "skipped macOS notarization")
507508
return
508509
}
509510
await notarize(options)
@@ -561,7 +562,7 @@ export default class MacPackager extends PlatformPackager<MacConfiguration> {
561562
}
562563
return proj
563564
}
564-
const { teamId } = options as NotarizeNotaryOptions
565+
const teamId = (options as NotarizeNotaryOptions)?.teamId
565566
if ((teamId || options === true) && (legacyLogin || notaryToolLogin)) {
566567
const proj: NotaryToolStartOptions = {
567568
appPath,

0 commit comments

Comments
 (0)