-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Closed as not planned
Closed as not planned
Copy link
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.
Description
- Version: 12.18.3
- Platform: macOS
- Subsystem: ARM
What steps will reproduce the bug?
Have a project that was still using promisify(fs.realpath) and replace this with fs.promises.realpath to clean it up thinking the runtime behaviour will be the same. But in reality there is different behaviour: on Windows, subst drives will be resolved to their targets when realpath.native is used and left untouched with realpath.
How often does it reproduce? Is there a required condition?
Always when using subst drives on Windows. There are probably more differences.
What is the expected behavior?
That the fs API is in sync with the non promised variant. fs.promises.realpath should be a drop in replacement for promisify(fs.realpath) but not promisify(fs.realpath.native). There should be a fs.promises.realpath.native.
What do you see instead?
fs.promises.realpath behaves like promisify(fs.realpath.native)
Metadata
Metadata
Assignees
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.