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

fix(node/fs): make fs.access resolve on windows #2775

Merged
merged 2 commits into from
Oct 14, 2022

Conversation

kt3k
Copy link
Member

@kt3k kt3k commented Oct 14, 2022

On windows fileInfo.mode is null and we treat it as 0o000 permission, and that makes any fs.access usage fail. This PR change it, and it treats that as 0o777 permission. It's still not perfect, but works better in many cases for npm modules. Especially this resolves denoland/deno#16255

@kt3k kt3k requested a review from bartlomieju as a code owner October 14, 2022 08:36
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM, nice fix!

@kt3k kt3k merged commit 03c8c31 into denoland:main Oct 14, 2022
@kt3k kt3k deleted the fix-fs-access-for-windows branch October 14, 2022 09:16
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

Successfully merging this pull request may close these issues.

npm: Prisma CLI can only execute he first command you try on Windows (in cmd/PowerShell)
2 participants