Skip to content

Commit

Permalink
upped timeout for profile; returning correct success code when switch…
Browse files Browse the repository at this point in the history
…ing profile
  • Loading branch information
jinal--shah committed May 10, 2017
1 parent e15f98f commit 0ed1db8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions assets/fs/etc/skel/profile.d/aws
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ aws_mfa_session() {

CREDS=$(
aws --profile $MFA_PROFILE sts get-session-token \
--duration-seconds 3600 \
--duration-seconds 86400 \
--serial-number $MFA_SERIAL \
--token-code $token_code
)
Expand Down Expand Up @@ -89,7 +89,9 @@ aws_profile() {
echo "Using profile $p"
unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN
export AWS_DEFAULT_PROFILE=$p
[[ ! -z "$x" ]] && _aws_profile_export "$p"
[[ ! -z "$x" ]] && ! _aws_profile_export "$p" && return 1

return 0
}

_aws_profile_export() {
Expand Down

0 comments on commit 0ed1db8

Please sign in to comment.