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

Make inputs fail if not connected to a terminal #261

Merged
merged 1 commit into from
May 21, 2023

Conversation

mitsuhiko
Copy link
Collaborator

Fixes #229

Fixes #148

Follows #260

@mitsuhiko mitsuhiko merged commit cde458b into master May 21, 2023
7 checks passed
@mitsuhiko mitsuhiko deleted the feature/check-for-term branch May 21, 2023 20:53
@jyn514
Copy link

jyn514 commented Aug 10, 2023

What is the intended way to use dialoguer for non-interactive Term objects? I would like to test my application by feeding it a Term::read_write_pair that I run assertions on, but this makes it impossible because it just immediately exits with an error instead of reading from the file.

@jyn514
Copy link

jyn514 commented Aug 10, 2023

I think the correct thing to do is to fix this upstream in console by reading from the read half of the pair instead of hard-coding Key::Unknown: console-rs/console#117

Looks like console-rs/console#173 was intended to fix that but hasn't gotten any reviews ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confirm::_interact_on infinite loop when not a tty
3 participants