binbashar / leverage

Binbash Leverage CLI intended to orchestrate Leverage Reference Architecture for AWS (www.binbash.co/leverage)
https://pypi.org/project/leverage/
Apache License 2.0
17 stars 2 forks source link

"aws sso login" stuck when CLI is not able to open the browser #196

Closed Franr closed 1 year ago

Franr commented 1 year ago

Describe the Bug

If you run leverage aws sso login from WSL, the webbrowser lib is not able to open browsers yet.

Expected Behavior

So we need to provide an automatic way (and a flag) of falling back to the previous behavior of printing the URL with the code and let the user handle it by themselves. Also, once the bug is fixed, the automatic fallback should be removed.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to any layer of a project.
  2. Run leverage aws sso login
  3. The command will hang waiting the browser to be opened.

Screenshots

image

Environment:

>> uname -r
5.15.90.1-microsoft-standard-WSL2
angelofenoglio commented 1 year ago

~This issue seems to provide a good workaround using wslview to launch the browser form within WSL: https://github.com/python/cpython/issues/89752. I think it's worth a try.~

Also https://docs.python.org/3/library/platform.html?highlight=platform#platform.uname would be the python native version of uname

EDIT: nvm I see the issue is linked in the second link

Franr commented 1 year ago

Resolved here: https://github.com/binbashar/leverage/pull/203