Skip to content

Commit

Permalink
fix: Builder attempts to sign OSX app even though no signing is speci…
Browse files Browse the repository at this point in the history
…fied

Closes #481, #484
  • Loading branch information
develar committed Jun 10, 2016
1 parent 1c983d4 commit 24f6045
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/codeSign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,15 @@ export let findIdentityRawResult: Promise<string> | null = null

export async function findIdentity(namePrefix: CertType, qualifier?: string): Promise<string | null> {
if (findIdentityRawResult == null) {
// -p codesigning must be not specified - installer identities is not listed if specified
findIdentityRawResult = exec("security", ["find-identity", "-v"])
// /~https://github.com/electron-userland/electron-builder/issues/481
findIdentityRawResult = exec("security", ["find-identity", "-v", "-p", "codesigning", "-p", "appleID"])
}

const lines = (await findIdentityRawResult).trim().split("\n")
// ignore last line valid identities found
lines.length = lines.length - 1
// /~https://github.com/electron-userland/electron-builder/issues/484
const lines = (await findIdentityRawResult)
.trim()
.split("\n")
.filter(it => !it.includes("(Missing required extension)") && !it.includes("valid identities found") && !it.includes("iPhone "))

for (let line of lines) {
if (qualifier != null && !line.includes(qualifier)) {
Expand Down

0 comments on commit 24f6045

Please sign in to comment.