bugfix ignored path must still be a string

This commit is contained in:
AJ ONeal 2018-06-28 03:27:34 -06:00
parent 28eb15d2e4
commit c1917f010b
1 changed files with 3 additions and 2 deletions

View File

@ -94,8 +94,9 @@ 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 ? fs.createReadStream(null, {
fd: fs.openSync({ path: '/dev/tty', flags: fs.constants.O_WRONLY | fs.constants.O_NOCTTY })
var ttyname = '/dev/tty';
var stdin = useTty ? fs.createReadStream(ttyname, {
fd: fs.openSync({ path: ttyname, flags: fs.constants.O_WRONLY | fs.constants.O_NOCTTY })
}) : process.stdin;
var readline = require('readline');
var rl = readline.createInterface({