-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Error when no TTY (Errno::ENOTTY: Inappropriate ioctl for device) #49
Comments
Hi Matt, thanks for using the library. Option 1 - I see the intention behind it, it will work when reading from file or other IO object and also allow piping stuff to command etc.... Though I'm not sure about the implementation itself. Option 2 feels rather 'dirty' to me and not very maintainable. Currently I have changes in master which will in effect make majority of prompts work in raw mode. This is to do with providing line editing functionality for prompts such as |
It's a pretty great library, so thanks for sharing it. No, I don't have experience working with ruby on a Windows machine, just Linux and Mac. So are you thinking of maybe checking if the input responds to raw/noecho in the mode and if not fall back to yield? Also, I was curious about this in console.rb
Should the |
This is really good catch. This makes things ever more interesting as at this point |
Thanks a lot for pointing out all of these problems, they are fixed in master. Would you mind taking |
Thanks for the update. I am going to give master a spin this morning. I'll let you know how it goes. |
Master works. My specs are now green. Want me to close this issue? Also, do you know if/when you might be cutting the next release. Thanks again. |
Great. Naaa let's keep this issue open for now until I release new version - this will act as a reminder. I don't want to subscribe to a strict deadline - it is open source after all and I want to get this right 😄 However, I'm planning to release shortly after I've implemented #40 and possibly #50 as I'm really close getting it done. All the ground work has been done but I need to implement few bits and ensure all works fine on Windows as well. Can you wait? In the meantime if possible you could point your Gemfile at master sha? |
Yep, totally understand. I can point to the master sha for now while I am developing. Was only curious as I don't believe it is possible to point to a github repo in a gemspec. |
I've just released |
I am hitting an error in my specs as there is no TTY on the build server. I have come up with two ways to address it and would like your input on which you think is best (if either).
Option 1: Update console.rb
Option 2: Override read_keypress in TestPrompt
I am leaning towards Option 1. Let me know and I can submit a PR.
Thanks.
The text was updated successfully, but these errors were encountered: