From 4e930a74d7c2e9b53d47e37997b444da95680a24 Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Mon, 4 Dec 2023 08:31:23 -0800 Subject: [PATCH] fix(win): use `resultOutputPath` to sign custom location for windows (#7919) * fix: pull `resultOutputPath` from `CustomWindowsSignTaskConfiguration` (fixes: #7910) --- .changeset/forty-teachers-run.md | 5 +++++ .../src/codeSign/windowsCodeSign.ts | 18 +++++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 .changeset/forty-teachers-run.md diff --git a/.changeset/forty-teachers-run.md b/.changeset/forty-teachers-run.md new file mode 100644 index 00000000000..b28ff2cc774 --- /dev/null +++ b/.changeset/forty-teachers-run.md @@ -0,0 +1,5 @@ +--- +"app-builder-lib": patch +--- + +fix: pull `resultOutputPath` from `CustomWindowsSignTaskConfiguration` (fixes: #7910) diff --git a/packages/app-builder-lib/src/codeSign/windowsCodeSign.ts b/packages/app-builder-lib/src/codeSign/windowsCodeSign.ts index a115836d3b3..7095735872f 100644 --- a/packages/app-builder-lib/src/codeSign/windowsCodeSign.ts +++ b/packages/app-builder-lib/src/codeSign/windowsCodeSign.ts @@ -56,18 +56,14 @@ export async function sign(options: WindowsSignOptions, packager: WinPackager): let isNest = false for (const hash of hashes) { const taskConfiguration: WindowsSignTaskConfiguration = { ...options, hash, isNest } - await Promise.resolve( - executor( - { - ...taskConfiguration, - computeSignToolArgs: isWin => computeSignToolArgs(taskConfiguration, isWin), - }, - packager - ) - ) + const config: CustomWindowsSignTaskConfiguration = { + ...taskConfiguration, + computeSignToolArgs: isWin => computeSignToolArgs(taskConfiguration, isWin), + } + await Promise.resolve(executor(config, packager)) isNest = true - if (taskConfiguration.resultOutputPath != null) { - await rename(taskConfiguration.resultOutputPath, options.path) + if (config.resultOutputPath != null) { + await rename(config.resultOutputPath, options.path) } }