pilot/lib/pilot/build_manager.rb in fastlane-2.210.0 vs pilot/lib/pilot/build_manager.rb in fastlane-2.210.1
- old
+ new
@@ -389,12 +389,15 @@
def transporter_for_selected_team(options)
# Use JWT auth
api_token = Spaceship::ConnectAPI.token
api_key = if options[:api_key].nil? && !api_token.nil?
# Load api key info if user set api_key_path, not api_key
- { key_id: api_token.key_id, issuer_id: api_token.issuer_id, key: api_token.key_raw, is_key_content_base64: api_token.is_key_content_base64 }
+ { key_id: api_token.key_id, issuer_id: api_token.issuer_id, key: api_token.key_raw }
elsif !options[:api_key].nil?
- options[:api_key].transform_keys(&:to_sym)
+ api_key = options[:api_key].transform_keys(&:to_sym).dup
+ # key is still base 64 style if api_key is loaded from option
+ api_key[:key] = Base64.decode64(api_key[:key]) if api_key[:is_key_content_base64]
+ api_key
end
unless api_token.nil?
api_token.refresh! if api_token.expired?
return FastlaneCore::ItunesTransporter.new(nil, nil, false, nil, api_token.text, upload: true, api_key: api_key)