[eas cli] Tar creation on windows: force the owner write bit on for directories#3489
Open
[eas cli] Tar creation on windows: force the owner write bit on for directories#3489
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3489 +/- ##
==========================================
- Coverage 53.39% 53.38% -0.00%
==========================================
Files 813 813
Lines 34438 34442 +4
Branches 7151 7153 +2
==========================================
Hits 18384 18384
- Misses 15972 15976 +4
Partials 82 82 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
✅ Thank you for adding the changelog entry! |
|
Subscribed to pull request
Generated by CodeMention |
douglowder
approved these changes
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
When a directory is set as read-only in NTFS, this works different than read-only directory in POSIX – read-only directory in Windows doesn't stop you from creating files inside it. In POSIX, read-only directory means that you can't create files in that directory. Now, when we're creating a tar in Windows, Node.js sees the mode of read-only directories as
0o555. When extracting this tar on a worker, we're seeing an error because it's forbidden to create files in such directory.Alternative to #3234
Fixes #3319
How
Conditionally add the
onWriteEntryhook on tar creation when the OS is Windows. The hook forces the owner write bit on for directories.Test Plan
I tested the fix in Windows 11. First, I attempted to run a build with nested read-only directories in my project. This has failed on extracting the tar in the worker. Then I tried with the changes from this PR applied, the build has succeeded.