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: use the built in way for Go to check permissions (fix for Windows and cross platform) #3671

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

arizchang1
Copy link

instead of explicitly checking EACCES and EPERM, Go has a built in way to check permissions (Windows fix and is cross-platform)

fixes the Windows issue reported by cuzfrog: #938

@evanw
Copy link
Owner

evanw commented Mar 7, 2024

Do you have a way to reproduce the issue? Ideally changes like this would have test coverage. This is especially important because I don't have a Windows machine and I never use Windows myself.

@arizchang1
Copy link
Author

Yes I reproduced it following this #938 (comment)
essentially we can make a dummy directory structure like test/test2/test3/test.ts, where the current user has access to test3 but not test2, and then run esbuild.exe --bundle test.ts from test3. I think it's the same issue that was fixed in that thread, but this is just a better cross-platform way to check permissions

@ulspider
Copy link

@arizchang1 or @evanw, is it possible to test on linux this fix in order to merge this fix ? I can test this fix on windows if you want

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.

3 participants