aws-sso-cli icon indicating copy to clipboard operation
aws-sso-cli copied to clipboard

Can't `CTRL-C` after using go-prompt to select role

Open synfinatic opened this issue 2 years ago • 4 comments

Basically go-prompt is blocking CTRL-C even after you have made a selection and Prompt.Run() has returned. The result is that if you try CTRL-C during AWS SSO / OIDC login/authentication, rather than the tool exiting like the user expects, they just see ^C printed in the terminal. The only way out is to either:

  1. Wait for the process to complete normally
  2. CTRL-Z to suspend + kill -9

synfinatic avatar Nov 01 '21 14:11 synfinatic

problem only happens in exec/console (not something like list) because it is caused by go-prompt

Not fixes:

  1. this patch is not a fix: https://github.com/c-bata/go-prompt/pull/239
  2. doing the doAuth() outside of Prompt.Run() doesn't help.
  3. https://github.com/c-bata/go-prompt/issues/233#issuecomment-934395156

synfinatic avatar Nov 02 '21 04:11 synfinatic

Marking as blocked at this time since this seems to be a go-prompt bug and I haven't found a work around. Also doesn't seem like go-prompt is being actively maintained :(

synfinatic avatar Nov 02 '21 05:11 synfinatic