/bin/pegjs: Don't close standard output

Avoids "Error: process.stdout cannot be closed" error when invoked
without file arguments.
redux
David Majda 12 years ago
parent 70e4166bb2
commit de256105eb

@ -138,5 +138,7 @@ readStream(inputStream, function(input) {
}
outputStream.write(exportVar + " = " + parser.toSource() + ";\n");
outputStream.end();
if (outputStream !== process.stdout) {
outputStream.end();
}
});

Loading…
Cancel
Save