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
Discard of stdin doesn't seem to work #194
Comments
First things first, from reading the documentation on
Re: |
By default Node.js if there are no listeners, exits the process. While in ora default is to simply re-emit the event to no listeners (as it's confirmed there are no listeners on event). So logically this breaks the contract. It doesn't turn into real issue only because with ora there's always other listeners on |
Actually, I take it back, it introduces an issue, as it unconditionally kills the process, not letting |
@medikoo Ok, rereading the code I kinda feel that you're right. However, if I run a test, the code works exactly as intended the way it is now. With no listeners on
|
@stroncium Line 76 in c5026b7
SIGINT from stdin.
What you observe is same behavior as if you'd pass |
Regarding this issue, it's getting convoluted, I propose to deal with the first part(switch to |
@stroncium Hi, is there any progress? I also noticed |
As I test in latest installation of ora, pressing enter creates a new line and duplicates a progress line, which gives impression that discard of stdin is not effective.
As I investigated it stopped working after #163 was taken.
Additional logical issues I've spotted in codebase:
ourEmit
looks as dead code. this function seem to be never used (do I miss something?)SINGINT
handling condition seems logically incorrect, however it's not an issue, asora
loadingsignal-exit
(through its dependencies) ensures there's always some listener toSIGINT
event attached. Nonetheless condition should start withif (process.listenerCount('SIGINT')) {
and notif (process.listenerCount('SIGINT') === 0) {
I'm not proposing a PR, as I'm not sure how conversion to
bl
should be handled (whether implementation should stick to it, but fix its setup, or revert tomute-stream
where it worked)/cc @aminya @stroncium
The text was updated successfully, but these errors were encountered: