Skip to content

Commit

Permalink
fix: No error if no valid cert to sign mac app
Browse files Browse the repository at this point in the history
Closes #897
  • Loading branch information
develar committed Nov 11, 2016
1 parent ff8a436 commit 22f73c0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/codeSign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,11 @@ async function getValidIdentities(keychain?: string | null): Promise<Array<strin
return result
}

async function _findIdentity(namePrefix: CertType, qualifier?: string | null, keychain?: string | null): Promise<string | null> {
async function _findIdentity(type: CertType, qualifier?: string | null, keychain?: string | null): Promise<string | null> {
// https://github.com/electron-userland/electron-builder/issues/484
//noinspection SpellCheckingInspection
const lines = await getValidIdentities(keychain)
const namePrefix = `${type}:`
for (let line of lines) {
if (qualifier != null && !line.includes(qualifier)) {
continue
Expand All @@ -159,7 +160,7 @@ async function _findIdentity(namePrefix: CertType, qualifier?: string | null, ke
}
}

if (namePrefix === "Developer ID Application") {
if (type === "Developer ID Application") {
// find non-Apple certificate
// https://github.com/electron-userland/electron-builder/issues/458
l: for (let line of lines) {
Expand Down

0 comments on commit 22f73c0

Please sign in to comment.