Skip to content

Commit

Permalink
Minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
alextwoods committed Aug 9, 2023
1 parent dc05315 commit ef5d075
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions gems/aws-sdk-core/lib/aws-sdk-core/shared_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def sso_credentials_from_profile(cfg, profile)
sso_role_name: prof_config['sso_role_name'],
sso_session: prof_config['sso_session'],
sso_region: sso_region,
sso_start_url: prof_config['sso_start_url']
sso_start_url: sso_start_url
)
end
end
Expand Down Expand Up @@ -458,12 +458,8 @@ def determine_profile(options)
end

def sso_session(cfg, profile, sso_session_name)
sso_session = cfg["sso-session #{sso_session_name}"]

if sso_session.nil? && sso_session_name.match(/\s/)
# aws sso-configure may add quotes around sso session names with whitespace
sso_session = cfg["sso-session '#{sso_session_name}'"]
end
# aws sso-configure may add quotes around sso session names with whitespace
sso_session = cfg["sso-session #{sso_session_name}"] || cfg["sso-session '#{sso_session_name}'"]

unless sso_session
raise ArgumentError,
Expand Down

0 comments on commit ef5d075

Please sign in to comment.