How can I allow read access to CWD (current working directory) used by Deno.cwd()
?
I want explicit permission only for CWD. I don't want to allow every read with plain --allow-read
flag.
I've tried to pass CWD
as a parameter but it doesn't work.
deno run --allow-read=CWD index.ts
Uncaught PermissionDenied: read access to <CWD>, run again with the --allow-read flag
Index.ts is just:
console.log(Deno.cwd());
I am using deno 1.2.0.
deno run --allow-read=. index.ts
? – Barytescwd()
(or any other way to get cwd path) I would be much happier. – BonhomieDeno.cwd()
inindex.ts
but I will need to use--allow-access
for different files. Something like--allow-access=path/to/file,another/path,cwd
. – Bonhomie