feat(cli): use NotCapable error for permission errors (#25431)

Closes #7394

---------

Co-authored-by: snek <snek@deno.com>
This commit is contained in:
Luca Casonato 2024-09-10 20:12:24 +02:00 committed by GitHub
parent be5419d479
commit 7bfcb4dd10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
71 changed files with 207 additions and 206 deletions

View file

@ -43,7 +43,7 @@ Deno.test({ permissions: { read: false } }, function dirCwdPermError() {
() => {
Deno.cwd();
},
Deno.errors.PermissionDenied,
Deno.errors.NotCapable,
"Requires read access to <CWD>, run again with the --allow-read flag",
);
});