Skip to content

Commit

Permalink
fix: redirect help (#1825)
Browse files Browse the repository at this point in the history
Fixes: #1807

Allows for nodemon --help > help.txt
  • Loading branch information
remy authored Jan 6, 2021
1 parent 6d320b2 commit ac0b55e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/nodemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ac0b55e

Please # to comment.