From 4585c6662be4cefafd6e67df1d859abb7988168e Mon Sep 17 00:00:00 2001 From: Mohamed El Mouctar Haidara Date: Fri, 10 May 2019 17:28:31 +0200 Subject: [PATCH] aws: really unset AWS*PROFILE variables in asp function (#7838) --- plugins/aws/aws.plugin.zsh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index 4bec30490..d70a64fcc 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -5,13 +5,15 @@ function agp { } function asp { + if [[ -z "$1" ]]; then + unset AWS_DEFAULT_PROFILE AWS_PROFILE AWS_EB_PROFILE + echo AWS profile cleared. + return + fi + export AWS_DEFAULT_PROFILE=$1 export AWS_PROFILE=$1 export AWS_EB_PROFILE=$1 - - if [[ -z "$1" ]]; then - echo AWS profile cleared. - fi } function aws_change_access_key {