-
-
Notifications
You must be signed in to change notification settings - Fork 629
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
Disable input handling in a non-tty environment #40
Comments
What Node.js version are you on? |
8.2.1
…Sent from my iPhone
On Aug 27, 2017, at 1:02 PM, Vadim Demedes ***@***.***> wrote:
What Node.js version are you on?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
This happened when I tried to launch my Ink app on WebStorm IDE, even more while using I think this error happen when you're trying to run a ink app in a non-tty env such debuggers or some IDE terminal. (I'm on Node v8.6.0, latest) |
Yes, I think it happens only in non-tty env, which I guess there's no way to enable interactive input. Possible solution for this would be to just disable the input altogether. |
I've just been looking at it and making a conditional to see if current env is TTY.
And it worked, it's now working on both debugger, WebStorm IDE and regular terminal (iTerm). Should I make a PR for this fix? I'm looking futher to see if I can make a better fix. |
Sure, a PR would be great, thanks! I'd completely disable all handling of stdin, not just |
Fixed via #42. Will close the issue when a release is out. |
Can we have this released please? |
Released |
/node_modules/ink/index.js:61
Never seen this one before and googling didn't help much - what's going on here? It's preventing me from running this example from your docs:
`const {h, render, Component} = require('ink');
class Counter extends Component {
constructor() {
super();
}
const unmount = render();
setTimeout(() => {
// Enough counting
unmount();
}, 1000);`
The text was updated successfully, but these errors were encountered: