Skip to content

Commit

Permalink
fix: signing of user-defined binaries on mac when resolved as relativ…
Browse files Browse the repository at this point in the history
…e path (#6660)
  • Loading branch information
mifi committed Feb 22, 2022
1 parent 8db6c72 commit 4c6d154
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .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
6 changes: 2 additions & 4 deletions packages/app-builder-lib/src/macPackager.ts
Expand Up @@ -243,17 +243,15 @@ export default class MacPackager extends PlatformPackager<MacConfiguration> {
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
}
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 = {
Expand Down

0 comments on commit 4c6d154

Please sign in to comment.