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? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
The following code works if it is run as node bug.js, but fails if it is run as yarn node bug.js
const fs=require("fs"); (async function (){ const Handle=await fs.promises.open("./test.txt","r"); const Size=(await fs.promises.stat("./test.txt")).size; Handle.read(Buffer.alloc(Size),0,Size,0).then(({bytesRead,buffer})=>{ console.log(bytesRead,buffer.toString("utf-8")) }) })()
const fs=require("fs"); await expect(async function (){ fs.writeFileSync("test.txt","test") const Handle=await fs.promises.open("test.txt","r"); const Size=(await fs.promises.stat("test.txt")).size; Handle.read(Buffer.alloc(Size),0,Size,0).then(({bytesRead,buffer})=>{ console.log(bytesRead,buffer.toString("utf-8")) }) }()).resolves.toBeUndefined();
System: OS: Linux 5.18 Arch Linux CPU: (2) x64 Intel(R) Pentium(R) CPU G3260 @ 3.30GHz Binaries: Node: 18.3.0 - /tmp/xfs-c94b87c2/node Yarn: 3.2.1 - /tmp/xfs-c94b87c2/yarn
No response
The text was updated successfully, but these errors were encountered:
FileHandle
Successfully merging a pull request may close this issue.
Self-service
Describe the bug
The following code works if it is run as node bug.js, but fails if it is run as yarn node bug.js
To reproduce
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: