Skip to content

Commit

Permalink
fix(mac): only skip notarization step when notarize is explicitly f…
Browse files Browse the repository at this point in the history
…alse (#8065)
  • Loading branch information
mmaietta authored Feb 20, 2024
1 parent 8f4acff commit 5681777
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/twelve-boxes-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": patch
---

fix(mac): only skip notarization step when `notarize` is explicitly false
7 changes: 4 additions & 3 deletions packages/app-builder-lib/src/macPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,12 +498,13 @@ export default class MacPackager extends PlatformPackager<MacConfiguration> {

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)
Expand Down Expand Up @@ -561,7 +562,7 @@ export default class MacPackager extends PlatformPackager<MacConfiguration> {
}
return proj
}
const { teamId } = options as NotarizeNotaryOptions
const teamId = (options as NotarizeNotaryOptions)?.teamId
if ((teamId || options === true) && (legacyLogin || notaryToolLogin)) {
const proj: NotaryToolStartOptions = {
appPath,
Expand Down

0 comments on commit 5681777

Please sign in to comment.