Try to detect interactive mode using process.stdin.isTTY

This commit is contained in:
Michael Bleigh
2015-10-05 18:54:35 -07:00
parent 42eda0c5cf
commit 227bafe95c

View File

@@ -86,6 +86,9 @@ Command.prototype.register = function(client) {
};
Command.prototype._prepare = function(options) {
if (!process.stdin.isTTY) {
options.nonInteractive = true;
}
if (utils.getInheritedOption(options, 'debug')) {
logger.transports.console.level = 'debug';
}