Open lann opened 4 months ago
cc @jandubois
There is some activity on this over at dialoguer
, but kind of inconclusive at the moment https://github.com/console-rs/dialoguer/issues/294
Sigh. Showing the cursor makes it display Error: read interrupted
on a Ctrl+C. From the issue it seems like we might need to handle this on every dialoguer error. ~I will... see if we can not.~ Except... in Ctrl+C you don't get to go down an error path. I am not sure what is going on in those suggestions.
Ha ha, but setting up the handler at the top level prevents us from Ctrl+C-ing out of normal prompts, it just goes round in a loop with "Invalid value: read interrupted".
From https://github.com/fermyon/spin/discussions/2555:
I believe this could be fixed by hooking SIGINT (as we do for
spin up
via thectrlc
crate) and calling https://docs.rs/console/0.15.7/console/struct.Term.html#method.show_cursor (viadialoguer::console
).