You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# test.coffee
ps = require("prompt-sync")()
out = NaN
while isNaN out
out = parseInt ps("enter input")
When I run this using coffee test.coffee and instead of entering text try exiting with control+c, it does not exit but just goes to the next tick of the while loop. When I enter "1", it exits as expected.
There's also the same behavior in Javascript. Here is the same script compiled to JS:
// test.js
// Generated by CoffeeScript 2.0.3
(function() {
var out, ps;
ps = require("prompt-sync")();
out = 0/0;
while (isNaN(out)) {
out = parseInt(ps("enter input"));
}
}).call(this);
When running this with node test.js, the same behavior occurs.
Is this expected, or should we be manually handling control+c?
prompt sync version '4.1.5'
coffee version 2.0.3
node version 9.0.0
The text was updated successfully, but these errors were encountered:
Sorry, I didnt read the readme ... the note on sigint is there. I wonder if sigint should default to true, I don't see the benefit in having false be the default, and it made me have to kill -9 the process.
I have the following simple coffeescript file:
When I run this using
coffee test.coffee
and instead of entering text try exiting with control+c, it does not exit but just goes to the next tick of thewhile
loop. When I enter "1", it exits as expected.There's also the same behavior in Javascript. Here is the same script compiled to JS:
When running this with
node test.js
, the same behavior occurs.Is this expected, or should we be manually handling control+c?
The text was updated successfully, but these errors were encountered: