common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
964 stars 91 forks source link

Unset leaves AWS_DEFAULT_REGION set #522

Closed greg-swift-yohana closed 8 months ago

greg-swift-yohana commented 9 months ago

Ran into this while updating my zsh shell prompt. Not necessarily a big deal, but its not doing what it says on the box.

assume Version: 0.19.0

From the help command:

   --unset, --un      Unset all environment variables configured by Assume (default: false)

My prompts with an awk showing environment variables:

➜  ~ env | awk -F'=' '/AWS/ {print $1}'
➜  ~ 
➜  ~ env | awk -F'=' '/AWS/ {print $1}'                    aws:prod-0:us-west-2
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_SESSION_TOKEN
AWS_PROFILE
AWS_REGION
AWS_DEFAULT_REGION
AWS_SESSION_EXPIRATION
AWS_CREDENTIAL_EXPIRATION
➜  ~                                                       aws:prod-0:us-west-2
➜  ~ env | awk -F'=' '/AWS/ {print $1}'                               us-west-2
AWS_DEFAULT_REGION
➜  ~                                                                  us-west-2
Eddie023 commented 9 months ago

Thank you for raising this @greg-swift-yohana. This should be fixed in the next release!