We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.2.3+8c4d3ff80
Darwin 24.3.0 arm64 arm
Run the following file with bun (I'm assuming the directory xxxx does not exist):
xxxx
console.log(require('fs').opendirSync('xxxx'))
Nodejs throws an error:
Error: ENOENT: no such file or directory, opendir
bun succeeds and returns a directory object:
Dir { readSync: [Function: readSync], read: [Function: read], close: [Function: close], closeSync: [Function: closeSync], path: [Getter], [Symbol(Symbol.asyncIterator)]: [AsyncGeneratorFunction], }
No response
The text was updated successfully, but these errors were encountered:
I'll pick this up. It looks like this is because node actually attempts to call the opendir syscall, whereas Bun just creates an object in JS-land.
opendir
Sorry, something went wrong.
Check if path exists before returning from opendirSync
6307ad9
Closes oven-sh#17581
Successfully merging a pull request may close this issue.
What version of Bun is running?
1.2.3+8c4d3ff80
What platform is your computer?
Darwin 24.3.0 arm64 arm
What steps can reproduce the bug?
Run the following file with bun (I'm assuming the directory
xxxx
does not exist):What is the expected behavior?
Nodejs throws an error:
What do you see instead?
bun succeeds and returns a directory object:
Additional information
No response
The text was updated successfully, but these errors were encountered: