Commit ce6a4bd6 authored by Caleb C. Sander's avatar Caleb C. Sander
Browse files

Prevent MaxListenersExceededWarning

Fixes #1
parent 82ae5fea
Showing with 3 additions and 0 deletions
+3 -0
......@@ -48,4 +48,7 @@ for (const arg of process.argv.slice(2)) {
}
if (!pattern) throw new Error('Syntax: node grep.js [-i] [-r] [-v] [-z] pattern ...files')
// Prevent warnings when piping many streams to `process.stdout`
process.stdout.setMaxListeners(Infinity)
// TODO: implement grep
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment