Version: Deno 2.4.5.
Seems there is some node WriteStream and --allow-write regression between deno 2.4.2 - 2.4.5
I have some code like
const outputWriteStream = createWriteStream("./__tests__/env.js", {
encoding: "utf-8",
});
outputWriteStream.write("something", "utf-8");
and running under windows with --allow-write='./__tests__/env.js'
produces some weird error
NotCapable: Requires write access to "\\?\C:\<full-path>\__tests__\env.js"
What is weird, maybe cause of bug, is the start of reported path - \\?\C:\
. When I add this full weird path into --allow-write option, It works. But './__tests__/env.js'
doesn't work.
Next investigation - when I use Deno.removeSync("./__tests__/env.js")
with same --allow-write='./__tests__/env.js'
flag. It works.
So it seems that there is some trouble between WriteStream file path and --allow-write permissions check?
On deno 2.4.2 - everything works fine.
If desired, I can create a minimal repro.