Skip to content

Commit

Permalink
Fix pipe reading logic on Windows (#516)
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 18, 2021
1 parent 2eab018 commit d5de793
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

1 comment on commit d5de793

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

CML watermark

Please sign in to comment.