Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
DyfanJones committed Nov 8, 2024
1 parent 63a9980 commit 4e9b355
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions paws.common/R/credential_providers.R
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ config_file_credential_source <- function(role_arn, role_session_name, mfa_seria
aws_sso_cmd <- function(profile_name, msg) {
cmd <- sprintf("aws sso login --profile %s", profile_name)
log_warn(msg, cmd)
system(cmd, intern = T)
system(cmd, intern = TRUE)
}

# Get credentials from profile associated with an SSO login. Assumes
Expand Down Expand Up @@ -267,7 +267,7 @@ sso_credential_process <- function(sso_session,
}
log_error(msg, input_str)
aws_sso_cmd(
sub("profile ", "", profile_name, fixed = T),
sub("profile ", "", profile_name, fixed = TRUE),
"Attempting to set credentials using: `%s`"
)
}
Expand Down Expand Up @@ -296,7 +296,7 @@ sso_credential_process <- function(sso_session,
resp <- svc$get_role_credentials(sso_role_name, sso_account_id, cache_creds$accessToken),
http_401 = function(err) {
if (grepl("Session token not found or invalid", err$error_response$message)) {
profile <- sub("profile ", "", profile_name, fixed = T)
profile <- sub("profile ", "", profile_name, fixed = TRUE)
if (retry_no == 1 || (!isTRUE(getOption("paws.aws_sso_creds")))) {
enrich_msg <- sprintf(
"Try refreshing sso credentials: `aws sso login --profile %s`", profile
Expand Down

0 comments on commit 4e9b355

Please sign in to comment.