useTty only when useTty is selected

This commit is contained in:
AJ ONeal 2018-06-13 11:29:06 -06:00
parent 1ff12d01f4
commit ad4ab2a06a
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ function askForConfig(answers, mainCb) {
answers = answers || {};
//console.log("Please create a config file at '" + confpath + "' or specify --config /path/to/config");
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 rl = readline.createInterface({
input: stdin