isaacs / node-graceful-fs

fs with incremental backoff on EMFILE
ISC License
1.27k stars 147 forks source link

Issue with statSync when using new `throwIfNoEntry` option. #221

Closed markjm closed 2 years ago

markjm commented 2 years ago

In short, using the throwIfNoEntry option will cause statSync to return undefined instead of throwing. This causes the checks in statFixSync for uid/gid to throw because stats can be null. Simple fix (which I will make a PR for) is to just check for stat existence

https://nodejs.org/dist/latest-v16.x/docs/api/fs.html#fsstatsyncpath-options

cc @isaacs

markjm commented 2 years ago

Actually looks like there is already a PR out for this #220

markjm commented 2 years ago

Friendly ping on this one @isaacs - trying to push the use of this option into some other tools, so want to make sure this upstream fix is available first