Skip to content

Commit

Permalink
Fix signing settings when no Keychain is specified - Fixed (#1152)
Browse files Browse the repository at this point in the history
Closes #1086
Closes #1020
  • Loading branch information
Syer10 authored Sep 11, 2021
1 parent 68d2040 commit 8371226
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ internal fun MacOSSigningSettings.validate(
val signIdentity = this.identity.orNull
?: error(ERR_UNKNOWN_SIGN_ID)
val keychainPath = this.keychain.orNull
val keychainFile =
listOf(project.file(keychainPath), project.rootProject.file(keychainPath))
val keychainFile = if (keychainPath != null) {
val keychainFile = listOf(project.file(keychainPath), project.rootProject.file(keychainPath))
.firstOrNull { it.exists() }
if (keychainPath != null) {
check(keychainFile != null && keychainFile.exists()) {
check(keychainFile != null) {
"$ERR_PREFIX could not find the specified keychain: $keychainPath"
}
}
keychainFile
} else null

return ValidatedMacOSSigningSettings(
bundleID = bundleID,
Expand Down

0 comments on commit 8371226

Please sign in to comment.