From 16cdb25f92956fef000b7030710c43c9c5008b6b Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 13 Jun 2018 11:29:06 -0600 Subject: [PATCH] useTty only when useTty is selected --- bin/telebit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/telebit.js b/bin/telebit.js index 12208b8..bfa7498 100644 --- a/bin/telebit.js +++ b/bin/telebit.js @@ -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