spaceship/lib/spaceship/tunes/tunes_client.rb in fastlane-2.96.1 vs spaceship/lib/spaceship/tunes/tunes_client.rb in fastlane-2.97.0

- old
+ new

@@ -63,11 +63,11 @@ if t_name.length > 0 && t_id.length.zero? # we prefer IDs over names, they are unique puts("Looking for iTunes Connect Team with name #{t_name}") if Spaceship::Globals.verbose? teams.each do |t| - t_id = t['contentProvider']['contentProviderId'].to_s if t['contentProvider']['name'].casecmp(t_name.downcase).zero? + t_id = t['contentProvider']['contentProviderId'].to_s if t['contentProvider']['name'].casecmp(t_name).zero? end puts("Could not find team with name '#{t_name}', trying to fallback to default team") if t_id.length.zero? end @@ -76,11 +76,11 @@ if t_id.length > 0 puts("Looking for iTunes Connect Team with ID #{t_id}") if Spaceship::Globals.verbose? # actually set the team id here self.team_id = t_id - return + return self.team_id end # user didn't specify a team... #thisiswhywecanthavenicethings loop do puts("Multiple #{'iTunes Connect teams'.yellow} found, please enter the number of the team you want to use: ") @@ -103,18 +103,18 @@ end unless Spaceship::Client::UserInterface.interactive? puts("Multiple teams found on iTunes Connect, Your Terminal is running in non-interactive mode! Cannot continue from here.") puts("Please check that you set FASTLANE_ITC_TEAM_ID or FASTLANE_ITC_TEAM_NAME to the right value.") - raise "Multiple iTunes Connect Teams found; unable to choose, terminal not ineractive!" + raise "Multiple iTunes Connect Teams found; unable to choose, terminal not interactive!" end selected = ($stdin.gets || '').strip.to_i - 1 team_to_use = teams[selected] if selected >= 0 if team_to_use self.team_id = team_to_use['contentProvider']['contentProviderId'].to_s # actually set the team id here - break + return self.team_id end end end def send_login_request(user, password)