What steps will reproduce the bug?
fsPromises.truncate(path) will result in a warning a few seconds later: (node:1387179) Warning: Closing file descriptor 22 on garbage collection - Using the callback truncate await new Promise((res, rej) => { fs.truncate(file, (err, ret) => { if(err) rej(err); else res(ret) }) }) works fine without such warning.
How often does it reproduce? Is there a required condition?
Every time.
What is the expected behavior?
Not having this warning.
What do you see instead?
Additional information
What steps will reproduce the bug?
fsPromises.truncate(path) will result in a warning a few seconds later:
(node:1387179) Warning: Closing file descriptor 22 on garbage collection- Using the callback truncateawait new Promise((res, rej) => { fs.truncate(file, (err, ret) => { if(err) rej(err); else res(ret) }) })works fine without such warning.How often does it reproduce? Is there a required condition?
Every time.
What is the expected behavior?
Not having this warning.
What do you see instead?
Additional information