Use a proper tty test.
This commit is contained in:
Родитель
6285fac232
Коммит
a52f59b437
|
@ -40,7 +40,7 @@ function Interface (output, completer) {
|
|||
|
||||
this.setPrompt("> ");
|
||||
|
||||
this.enabled = output.fd < 3; // Looks like a TTY.
|
||||
this.enabled = stdio.isatty(output.fd);
|
||||
|
||||
if (parseInt(process.env['NODE_NO_READLINE'], 10)) {
|
||||
this.enabled = false;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// Can't test this when 'make test' doesn't assign a tty to the stdout.
|
||||
// Yet another use-case for require('tty').spawn ?
|
||||
common = require("../common");
|
||||
assert = common.assert;
|
||||
var readline = require("readline");
|
Загрузка…
Ссылка в новой задаче