Use a proper tty test.
This commit is contained in:
parent
6285fac232
commit
a52f59b437
@ -40,7 +40,7 @@ function Interface (output, completer) {
|
|||||||
|
|
||||||
this.setPrompt("> ");
|
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)) {
|
if (parseInt(process.env['NODE_NO_READLINE'], 10)) {
|
||||||
this.enabled = false;
|
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");
|
common = require("../common");
|
||||||
assert = common.assert;
|
assert = common.assert;
|
||||||
var readline = require("readline");
|
var readline = require("readline");
|
Loading…
x
Reference in New Issue
Block a user