trek10inc / awsume

A utility for easily assuming AWS IAM roles from the command line.
https://awsu.me
MIT License
494 stars 90 forks source link

Adding alias to pyenv .bashrc causes problems #49

Closed 1oglop1 closed 5 years ago

1oglop1 commented 5 years ago

Hi I installed awsume into virtualenv and it caused unexpected problem. I have installed own fork of pyenv which does not need to use pyenv which https://github.com/pyenv/pyenv/pull/1185

and awsume added this line to my .bashrc alias awsume=". \$(pyenv which awsume)" but since I installed awsume into venv not created by pyenv virtualenv I do not have any shims and calling awsume calls alias which overrides what is supposed to be called by path when alias is called $ awsume the result is this.

pyenv: awsume: command not found
-bash: .: filename argument required
.: usage: . filename [arguments]

the same output is given if called from venv (venv) $ awsume results in

pyenv: awsume: command not found
-bash: .: filename argument required
.: usage: . filename [arguments]

to find out what was happening I ran type -a awsume

awsume is aliased to `. $(pyenv which awsume)'
awsume is /Users/username/.virtualenvs/venv/bin/awsume

after removing the alias from my .bashrc everything was fine again.

mbarneyjr commented 5 years ago

We will not be releasing support a custom fork of pyenv. The alias is necessary for awsume to be able to export environment variables to your current shell, and we use pyenv which awsume to invoke the correct shell script for users that installed it via pyenv.