4585c6662be4cefafd6e67df1d859abb7988168e

Author
Mohamed El Mouctar Haidara <elmhaidara@gmail.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

aws: really unset AWS*PROFILE variables in asp function (#7838)

Diff

 1diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
 2index 4bec304908b08f07fcda1a58ea0eefdd6302be9a..d70a64fcc61365596f4791fcb117d3a6891bbf57 100644
 3--- a/plugins/aws/aws.plugin.zsh
 4+++ b/plugins/aws/aws.plugin.zsh
 5@@ -5,13 +5,15 @@ function agp {
 6 }
 7 
 8 function asp {
 9-  export AWS_DEFAULT_PROFILE=$1
10-  export AWS_PROFILE=$1
11-  export AWS_EB_PROFILE=$1
12-
13   if [[ -z "$1" ]]; then
14+    unset AWS_DEFAULT_PROFILE AWS_PROFILE AWS_EB_PROFILE
15     echo AWS profile cleared.
16+    return
17   fi
18+
19+  export AWS_DEFAULT_PROFILE=$1
20+  export AWS_PROFILE=$1
21+  export AWS_EB_PROFILE=$1
22 }
23 
24 function aws_change_access_key {