Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confirm::_interact_on infinite loop when not a tty #148

Closed
ahcodedthat opened this issue Nov 9, 2021 · 2 comments · Fixed by #229 or #261
Closed

Confirm::_interact_on infinite loop when not a tty #148

ahcodedthat opened this issue Nov 9, 2021 · 2 comments · Fixed by #229 or #261
Labels
p-confirm Prompt: Confirm

Comments

@ahcodedthat
Copy link

Confirm::_interact_on calls Term::read_key in a loop but doesn't break out of the loop if the return value is Key::Unknown, which read_key returns if not connected to a terminal. This causes an infinite loop.

@pksunkara pksunkara added the p-confirm Prompt: Confirm label Nov 23, 2021
@physics515
Copy link

Is this why using the debugger in VS code causes an infinite loop of displaying the prompt?

@DanteMarshal
Copy link
Contributor

DanteMarshal commented Nov 9, 2022

This also happens when I launch in an external terminal from VS Code on Windows (i.e. "console": "externalTerminal" in launch.json)
What could be the cause ?
This doesn't happen if I run cargo run as a Task in VS Code, or if I run it manually either through cargo or through the .exe file.

Update : The VS Code debugger is caused by this issue on console crate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p-confirm Prompt: Confirm
Projects
None yet
4 participants