Skip to content

Commit

Permalink
Fix pipe reading logic on Windows
Browse files Browse the repository at this point in the history
The fs.readSync function throws EOF instead of returning 0 like in other systems.
See nodejs/node#35997 for more information.
  • Loading branch information
0x2b3bfa0 committed May 14, 2021
1 parent 3736d7f commit d76828f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/pipe-args.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports.load = (format) => {

chunks.push(buffer.slice(0, nbytes));
} catch (err) {
if (err.code === 'EOF') break; // HACK: see nodejs/node#35997
if (err.code !== 'EAGAIN') throw err;
}
}
Expand Down

0 comments on commit d76828f

Please sign in to comment.