Skip to content

Commit

Permalink
Merge pull request #2 from ymschaap/patch-1
Browse files Browse the repository at this point in the history
Sign macOS objects depth-first (close electron-userland#4932)
  • Loading branch information
ymschaap committed May 21, 2020
2 parents 1f74428 + 8bd63b7 commit aba3e49
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/app-builder-lib/electron-osx-sign/sign.js
Expand Up @@ -119,6 +119,17 @@ async function verifySignApplicationAsync (opts) {
function signApplicationAsync (opts) {
return walkAsync(getAppContentsPath(opts))
.then(async function (childPaths) {
/**
* Sort the child paths by how deep they are in the file tree. Some arcane apple
* logic expects the deeper files to be signed first otherwise strange errors get
* thrown our way
*/
childPaths = childPaths.sort((a, b) => {
const aDepth = a.split(path.sep).length
const bDepth = b.split(path.sep).length
return bDepth - aDepth
})

function ignoreFilePath (opts, filePath) {
if (opts.ignore) {
return opts.ignore.some(function (ignore) {
Expand Down

0 comments on commit aba3e49

Please sign in to comment.