From eb842f7faee3a261635fb3e59230e09c98840e40 Mon Sep 17 00:00:00 2001 From: Navdeep Singh Rathore <57226514+nsrCodes@users.noreply.github.com> Date: Sun, 5 Mar 2023 01:22:12 +0530 Subject: [PATCH] fix(packager): return success status from doSign function calls (#7431) --- .changeset/real-poets-compare.md | 5 +++++ packages/app-builder-lib/src/macPackager.ts | 3 +-- packages/app-builder-lib/src/winPackager.ts | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .changeset/real-poets-compare.md diff --git a/.changeset/real-poets-compare.md b/.changeset/real-poets-compare.md new file mode 100644 index 00000000000..96d27e09bc6 --- /dev/null +++ b/.changeset/real-poets-compare.md @@ -0,0 +1,5 @@ +--- +"app-builder-lib": patch +--- + +fix packager: return success status from doSign function calls diff --git a/packages/app-builder-lib/src/macPackager.ts b/packages/app-builder-lib/src/macPackager.ts index c22f3f5471e..01a0beefbdf 100644 --- a/packages/app-builder-lib/src/macPackager.ts +++ b/packages/app-builder-lib/src/macPackager.ts @@ -376,7 +376,7 @@ export default class MacPackager extends PlatformPackager { } //noinspection JSMethodCanBeStatic - protected async doSign(opts: SignOptions): Promise { + protected doSign(opts: SignOptions): Promise { return signAsync(opts) } @@ -457,7 +457,6 @@ export default class MacPackager extends PlatformPackager { const appFileName = `${this.appInfo.productFilename}.app` await readDirectoryAndSign(packContext.appOutDir, await readdir(packContext.appOutDir), file => file === appFileName) - if (!isAsar) { return true } diff --git a/packages/app-builder-lib/src/winPackager.ts b/packages/app-builder-lib/src/winPackager.ts index 43adce5fddc..d28d89534b8 100644 --- a/packages/app-builder-lib/src/winPackager.ts +++ b/packages/app-builder-lib/src/winPackager.ts @@ -210,7 +210,7 @@ export class WinPackager extends PlatformPackager { const cscInfo = await this.cscInfo.value if (cscInfo == null) { if (this.platformSpecificBuildOptions.sign != null) { - await sign(signOptions, this) + return await sign(signOptions, this) } else if (this.forceCodeSigning) { throw new InvalidConfigurationError( `App is not signed and "forceCodeSigning" is set to true, please ensure that code signing configuration is correct, please see https://electron.build/code-signing`