useTty only when useTty is selected
This commit is contained in:
parent
d40e86cc56
commit
16cdb25f92
|
@ -91,7 +91,7 @@ function askForConfig(answers, mainCb) {
|
||||||
answers = answers || {};
|
answers = answers || {};
|
||||||
//console.log("Please create a config file at '" + confpath + "' or specify --config /path/to/config");
|
//console.log("Please create a config file at '" + confpath + "' or specify --config /path/to/config");
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var stdin = useTty ? process.stdin : fs.createReadStream('/dev/tty');
|
var stdin = useTty ? fs.createReadStream('/dev/tty') : process.stdin;
|
||||||
var readline = require('readline');
|
var readline = require('readline');
|
||||||
var rl = readline.createInterface({
|
var rl = readline.createInterface({
|
||||||
input: stdin
|
input: stdin
|
||||||
|
|
Loading…
Reference in New Issue