Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed Jun 28, 2024
1 parent 8afcda3 commit 484c915
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/subprocess.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,8 @@ class SubProcess extends EventEmitter {
const handleStreamLines = (/** @type {string} */ streamName, /** @type {import('stream').Readable} */ input) => {
const rl = createInterface({input});
rl.on('line', (line) => {
const emitArg = [line];
this.emit(`lines-${streamName}`, emitArg);
this.emitLines(streamName, emitArg);
this.emit(`lines-${streamName}`, [line]);
this.emitLines(streamName, line);
});
};

Expand Down

0 comments on commit 484c915

Please sign in to comment.