From ce0326f21bad7393e9719a9ed9a53182ed2f8d39 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Thu, 16 May 2019 16:41:34 +0300 Subject: [PATCH] don't add keychain to search list multiple times --- xcode/commonFastfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xcode/commonFastfile b/xcode/commonFastfile index 76a1b58..dff1da3 100644 --- a/xcode/commonFastfile +++ b/xcode/commonFastfile @@ -170,11 +170,16 @@ end private_lane :openKeychain do |options| if is_ci? + # workaround to avoid duplication problem + # https://apple.stackexchange.com/questions/350633/multiple-duplicate-keychain-dbs-that-dont-get-cleaned-up + keychain_exists = File.exists?("~/Library/Keychains/#{options[:keychain_name]}.keychain-db") + create_keychain( name: options[:keychain_name], password: options[:keychain_password], unlock: true, - timeout: false + timeout: false, + add_to_search_list: !keychain_exists ) else unlock_keychain(