Skip to content

Commit

Permalink
Merge pull request #365 from dxw/move-aws-sso-login-message
Browse files Browse the repository at this point in the history
Move aws-sso login message
  • Loading branch information
Stretch96 authored Sep 27, 2024
2 parents 6e01be4 + dcd1bd7 commit ab5317e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/aws-sso/v2/login
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ done
START_URL="$(aws configure get sso_start_url --profile dalmatian-login)"
AWS_SSO_CACHE_JSON="$(grep -h -e "\"$START_URL\"" ~/.aws/sso/cache/*.json || true)"
EXPIRES_AT="$(echo "$AWS_SSO_CACHE_JSON" | jq -r '.expiresAt')"
log_info -l "Attempting AWS SSO login ..." -q "$QUIET_MODE"
if [ -n "$EXPIRES_AT" ]
then
EXPIRES_AT_SEC="$(gdate -d "$EXPIRES_AT" +%s)"
Expand All @@ -44,7 +45,6 @@ if [[
"$FORCE_RELOG" == "1"
]]
then
log_info -l "Attempting AWS SSO login ..." -q "$QUIET_MODE"
aws sso login --profile "$AWS_SSO_PROFILE"
log_info -l "Checking AWS SSO login was successful..." -q "$QUIET_MODE"
AWS_SSO_CACHE_JSON="$(grep -h -e "\"$START_URL\"" ~/.aws/sso/cache/*.json || true)"
Expand Down

0 comments on commit ab5317e

Please sign in to comment.