Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with statSync when using new throwIfNoEntry option. #221

Closed
markjm opened this issue Oct 28, 2021 · 2 comments
Closed

Issue with statSync when using new throwIfNoEntry option. #221

markjm opened this issue Oct 28, 2021 · 2 comments

Comments

@markjm
Copy link

markjm commented Oct 28, 2021

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
Copy link
Author

markjm commented Oct 28, 2021

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

@markjm
Copy link
Author

markjm commented Nov 8, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant