fix: redirect help (#1825)

Fixes: #1807

Allows for nodemon --help > help.txt
This commit is contained in:
Remy Sharp
2021-01-06 14:59:30 +00:00
committed by GitHub
parent 6d320b2dab
commit ac0b55e50a

View File

@@ -39,7 +39,9 @@ function nodemon(settings) {
}
if (settings.help) {
process.stdout._handle.setBlocking(true); // nodejs/node#6456
if (process.stdout.isTTY) {
process.stdout._handle.setBlocking(true); // nodejs/node#6456
}
console.log(help(settings.help));
if (!config.required) {
process.exit(0);