Skip to content

Commit ac0b55e

Browse files
authored
fix: redirect help (#1825)
Fixes: #1807 Allows for nodemon --help > help.txt
1 parent 6d320b2 commit ac0b55e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/nodemon.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ function nodemon(settings) {
3939
}
4040

4141
if (settings.help) {
42-
process.stdout._handle.setBlocking(true); // nodejs/node#6456
42+
if (process.stdout.isTTY) {
43+
process.stdout._handle.setBlocking(true); // nodejs/node#6456
44+
}
4345
console.log(help(settings.help));
4446
if (!config.required) {
4547
process.exit(0);

0 commit comments

Comments
 (0)