Skip to content

Commit 24f6045

Browse files
committed
fix: Builder attempts to sign OSX app even though no signing is specified
Closes #481, #484
1 parent 1c983d4 commit 24f6045

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/codeSign.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,15 @@ export let findIdentityRawResult: Promise<string> | null = null
161161

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

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

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

0 commit comments

Comments
 (0)