@@ -21,7 +21,13 @@ import { isMacOsHighSierra } from "./util/macosVersion"
21
21
import { getTemplatePath } from "./util/pathManager"
22
22
import * as fs from "fs/promises"
23
23
import { notarize , NotarizeOptions } from "@electron/notarize"
24
- import { LegacyNotarizePasswordCredentials , LegacyNotarizeStartOptions , NotaryToolStartOptions , NotaryToolCredentials } from "@electron/notarize/lib/types"
24
+ import {
25
+ LegacyNotarizePasswordCredentials ,
26
+ LegacyNotarizeStartOptions ,
27
+ NotaryToolStartOptions ,
28
+ NotaryToolCredentials ,
29
+ NotaryToolKeychainCredentials ,
30
+ } from "@electron/notarize/lib/types"
25
31
26
32
export type CustomMacSignOptions = SignOptions
27
33
export type CustomMacSign = ( configuration : CustomMacSignOptions , packager : MacPackager ) => Promise < void >
@@ -533,8 +539,12 @@ export default class MacPackager extends PlatformPackager<MacConfiguration> {
533
539
// option 3: keychain
534
540
const keychain = process . env . APPLE_KEYCHAIN
535
541
const keychainProfile = process . env . APPLE_KEYCHAIN_PROFILE
536
- if ( keychain && keychainProfile ) {
537
- return this . generateNotarizeOptions ( appPath , undefined , { keychain, keychainProfile } )
542
+ if ( keychainProfile ) {
543
+ let args : NotaryToolKeychainCredentials = { keychainProfile }
544
+ if ( keychain ) {
545
+ args = { ...args , keychain }
546
+ }
547
+ return this . generateNotarizeOptions ( appPath , undefined , args )
538
548
}
539
549
540
550
// if no credentials provided, skip silently
0 commit comments