denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
98.22k stars 5.41k forks source link

Different results when code is ran directly vs ran as a task #25620

Open littletof opened 2 months ago

littletof commented 2 months ago

Version: Deno 1.46.3

When I run a command as a task, it completes without an issue, but when I run it directly, the same code gives me an access denied error:

deno run x vs deno run -RW=./things example.ts

The issue is the same when I ran it with deno run --prompt -RW=./things example.ts.

⚠️ But also, if I flip the order to deno run -RW=./things --prompt example.ts I get another type of error, it not recognising --prompt. Current docs mention the existence of this flag.

image

littletof commented 2 months ago

Seems like I do not get the Access denied error when running it with CMD.

Also I think --prompt flag does not exist in 1.46.3, so either it will be in 2.0 and the docs are ahead, or its a removed flag and the docs are behind :slightly_smiling_face:

yazan-abdalrahman commented 2 months ago

@bartlomieju What is the proper way to handle this-WR=./things? It can be expressed as -W -R=./things or-W=./things -R=./things.