Skip to content

Commit

Permalink
fix: appDireactory missing for windows-sign options (#1731)
Browse files Browse the repository at this point in the history
* fix: appDireactory missing for windows-sign options

* fix: windows sign options typings
  • Loading branch information
rickymohk authored Jun 17, 2024
1 parent 022f6d5 commit 2f92bbd
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/win32.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class WindowsApp extends App {
const windowsMetaData = this.opts.win32metadata;

if (windowsSignOpt) {
const signOpts = createSignOpts(windowsSignOpt, windowsMetaData);
const signOpts = createSignOpts(windowsSignOpt, windowsMetaData, this.stagingPath);
debug(`Running @electron/windows-sign with the options ${JSON.stringify(signOpts)}`);
try {
await sign(signOpts as WindowsInternalSignOptions);
Expand All @@ -98,8 +98,11 @@ export class WindowsApp extends App {
}
}

function createSignOpts(properties: ComboOptions['windowsSign'],
windowsMetaData: ComboOptions['win32metadata']): WindowsSignOptions {
function createSignOpts(
properties: ComboOptions['windowsSign'],
windowsMetaData: ComboOptions['win32metadata'],
appDirectory: string,
): WindowsSignOptions & WindowsInternalSignOptions {
let result: WindowsSignOptions = {};

if (typeof properties === 'object') {
Expand All @@ -111,7 +114,7 @@ function createSignOpts(properties: ComboOptions['windowsSign'],
result.description = windowsMetaData.FileDescription;
}

return result;
return { ...result, appDirectory };
}

export { WindowsApp as App };

0 comments on commit 2f92bbd

Please sign in to comment.