-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Use node's path.isAbsolute when running with a node fs #17821
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
Use node's path.isAbsolute when running with a node fs #17821
Conversation
|
This is also related to python/cpython#96509 CPython uses opendir to read files for import so it needs this to work in order for the node build to be portable. |
|
Sorry I didn't add any tests because I wasn't sure how to detect if on windows or not. If there's a way to do so, I think the |
|
node's os module perhaps? |
|
Sorry I meant in the |
…odo/emscripten into rchiodo/fix_node_path_isabs
|
@tiran do you know who I might ping to get this reviewed? I managed to figure out how to add a windows only test. |
|
I just opened an alternative PR for this at #17849. |
|
Closing in favor of @kleisauke's #17849 |
Ensures that absolute paths are handled correctly on Windows as well. Using these helpers should be safe, since binaries linked with -sNODERAWFS can only be used on Node.js, see: emscripten/src/library_noderawfs.js Line 28 in e98554f throw new Error("NODERAWFS is currently only supported on Node.js environment.") Context: #16296 Resolves: #17360. Resolves: #17819. Supersedes: #17821.
Fixes #17819
Fixes problems with windows paths when running node builds on windows machines.