making reading from stdin option if not a tty

This commit is contained in:
Ryan Day 2018-07-31 09:03:52 -07:00
parent 025453e3a7
commit 46bc19ea1c

View file

@ -132,6 +132,8 @@ if (process.stdin.isTTY) {
})
process.stdin.on('end', function () {
processInputs(text, argv)
// this process can be run as a command outside of a tty so if there was no
// data on stdin read from argv
processInputs(text.length?text:argv._.join(' '), argv)
})
}