diff --git a/.changeset/eleven-rivers-confess.md b/.changeset/eleven-rivers-confess.md new file mode 100644 index 00000000000..b6a09df6fc9 --- /dev/null +++ b/.changeset/eleven-rivers-confess.md @@ -0,0 +1,5 @@ +--- +"app-builder-lib": patch +--- + +Fix error thrown due to duplicated signing of user-defined binaries on mac when resolving relative path diff --git a/packages/app-builder-lib/src/macPackager.ts b/packages/app-builder-lib/src/macPackager.ts index eab84542e9c..e0331393e73 100644 --- a/packages/app-builder-lib/src/macPackager.ts +++ b/packages/app-builder-lib/src/macPackager.ts @@ -243,7 +243,7 @@ export default class MacPackager extends PlatformPackager { let binaries = options.binaries || undefined if (binaries) { // Accept absolute paths for external binaries, else resolve relative paths from the artifact's app Contents path. - const userDefinedBinaries = await Promise.all( + binaries = await Promise.all( binaries.map(async destination => { if (await statOrNull(destination)) { return destination @@ -251,9 +251,7 @@ export default class MacPackager extends PlatformPackager { return path.resolve(appPath, destination) }) ) - // Insert at front to prioritize signing. We still sort by depth next - binaries = userDefinedBinaries.concat(binaries) - log.info("Signing addtional user-defined binaries: " + JSON.stringify(userDefinedBinaries, null, 1)) + log.info("Signing addtional user-defined binaries: " + JSON.stringify(binaries, null, 1)) } const signOptions: any = {