-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
fix return value of fs APIs #58996
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
Merged
Merged
fix return value of fs APIs #58996
+24
−17
Conversation
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
a3f7322
to
c2451ee
Compare
For testing, you can after this line the test assert.rejects(async () => {
await fs.promises.mkdtemp(path.join(blockedFolder, 'any-folder'));
}, {
code: 'ERR_ACCESS_DENIED',
permission: 'FileSystemWrite',
}); That's what I had originally done when I ran into this. |
81c0615
to
ee0fda6
Compare
ee0fda6
to
4a03ac6
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #58996 +/- ##
==========================================
- Coverage 90.07% 90.05% -0.03%
==========================================
Files 641 645 +4
Lines 188594 189168 +574
Branches 36998 37097 +99
==========================================
+ Hits 169869 170346 +477
- Misses 11438 11519 +81
- Partials 7287 7303 +16
🚀 New features to boost your workflow:
|
4a03ac6
to
0b4820b
Compare
This was referenced Jul 10, 2025
RafaelGSS
approved these changes
Jul 14, 2025
PTAL @nodejs/fs |
jazelly
approved these changes
Jul 15, 2025
Ethan-Arrowood
approved these changes
Jul 15, 2025
Landed in bf2384f |
aduh95
pushed a commit
that referenced
this pull request
Jul 21, 2025
PR-URL: #58996 Fixes: #58747 Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Jason Zhang <[email protected]> Reviewed-By: Ethan Arrowood <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
c++
Issues and PRs that require attention from people who are familiar with C++.
fs
Issues and PRs related to the fs subsystem / file system.
needs-ci
PRs that need a full CI run.
permission
Issues and PRs related to the Permission Model
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.
Fixed: #58747
The C++ layer just reject the Promise but does not return the Promise to JS layer when an error occurs(Libuv error or permission error).
make -j4 test
(UNIX), orvcbuild test
(Windows) passes