abyss / awsp-plus

Switch AWS Profiles Even Easier
Other
13 stars 6 forks source link

awsp crashes Ubuntu Terminal and Guake after choosing a profile #14

Closed br-fedaykin closed 4 weeks ago

br-fedaykin commented 1 year ago

Hi, I configured alias for awsp and when I call it I see the profile list but when I choose one of them the terminal dies. The same behavior happens with native ubuntu terminal and guake. Where are awsp logs written, so I can put them here for analysis?

aws-cli works fine when using --profile flag.

$ alias
alias awsp='source _awspp'

$ guake --version
Guake Terminal: 3.10
VTE: 0.68.0
VTE runtime: 0.68.0
Gtk: 3.24.33

$ npm -g list
~/.asdf/installs/nodejs/20.5.1/lib
├── awsp-plus@1.2.0
├── corepack@0.19.0
└── npm@9.8.0

$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"
br-fedaykin commented 1 year ago

I saw a identical issue on original awsp (https://github.com/johnnyopao/awsp/issues/5). I noticed that awsp-plus modify ~/.awsp before crashing, so I did this workaround in the alias to make it work:

alias='_awspp && export AWS_PROFILE="$(cat ~/.awsp)"'

Yet, I don't know the root cause of the problem, I could help analysing the code but I need some time to understand how to run this in development mode.

abyss commented 1 year ago

Are you using nodeenv? That seems to be the root of the problem described in the issue you linked.

I'm not sure what the problem is because I don't understand what interaction with nodeenv causes the crash.

br-fedaykin commented 1 year ago

Hi, I haven't configured nodeenv myself. I just installed node with asdf and maybe asdf uses nodeenv, how can I verify whether it is installed?

abyss commented 4 weeks ago

@br-fedaykin I've rewritten this entirely golang, which likely fixes your issue. If you're still interested in this, check it out at https://github.com/abyss/go-awsp :)