Closed teekaay closed 6 years ago
The first thing I would look for if your variables aren't being set is the alias for awsume.
Awsume's shell script must be sourced when executed so that the environment variables will be set to the current shell, instead of creating a subshell, setting the subshell's environment variables and closing the subshell.
Awsume's installation should have put an alias definition in your .bashrc
, .bash_profile
, etc. for you that looks like this:
alias awsume=". awsume"
Some users didn't have one of those files on their system when they installed awsume, in which case you could create the file and reinstall awsume. If that exists in one of your login files, then check to make sure the alias exists by running alias
to list your current shell's aliases. Also note that once you install awsume, you may need to open a new terminal for the alias to be set by the login file.
If everything looks good, but is still not working please let us know!
Thanks for your advice, I really was missing the alias entry in my bashrc. This issue can be closed!
I am using pyenv as my version manager. When executing awsume it will print out
However, when I call
awsume my-profile
and then try to print out one of the variables, they are empty. Using$(awsume -s my-profile)
instead makes it work. I suppose this has something to do with the way pyenv handles executables. The relevant line isexec "/home/me/.pyenv/libexec/pyenv" exec "$program" "$@"
which as far as I understand starts a subshell and prevents the variables from being exported.
Is there a way to make awsume work with pyenv or am I doing something wrong?