From 7bfcb4dd10d31f5f9566c90a28449c0951f3a48e Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Tue, 10 Sep 2024 20:12:24 +0200 Subject: feat(cli): use NotCapable error for permission errors (#25431) Closes #7394 --------- Co-authored-by: snek --- tests/testdata/bench/allow_none.out | 12 ++++++------ tests/testdata/bench/no_prompt_by_default.out | 2 +- tests/testdata/bench/no_prompt_with_denied_perms.out | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/testdata/bench') diff --git a/tests/testdata/bench/allow_none.out b/tests/testdata/bench/allow_none.out index 9499e234a..2a75ab5fd 100644 --- a/tests/testdata/bench/allow_none.out +++ b/tests/testdata/bench/allow_none.out @@ -6,16 +6,16 @@ Runtime | Deno [WILDCARD] ([WILDCARD]) benchmark time/iter (avg) iter/s (min … max) p75 p99 p995 ----------- ----------------------------- --------------------- -------------------------- -read error: PermissionDenied: Can't escalate parent thread permissions +read error: NotCapable: Can't escalate parent thread permissions [WILDCARD] -write error: PermissionDenied: Can't escalate parent thread permissions +write error: NotCapable: Can't escalate parent thread permissions [WILDCARD] -net error: PermissionDenied: Can't escalate parent thread permissions +net error: NotCapable: Can't escalate parent thread permissions [WILDCARD] -env error: PermissionDenied: Can't escalate parent thread permissions +env error: NotCapable: Can't escalate parent thread permissions [WILDCARD] -run error: PermissionDenied: Can't escalate parent thread permissions +run error: NotCapable: Can't escalate parent thread permissions [WILDCARD] -ffi error: PermissionDenied: Can't escalate parent thread permissions +ffi error: NotCapable: Can't escalate parent thread permissions [WILDCARD] error: Bench failed diff --git a/tests/testdata/bench/no_prompt_by_default.out b/tests/testdata/bench/no_prompt_by_default.out index 3a2574e28..d9e83cf25 100644 --- a/tests/testdata/bench/no_prompt_by_default.out +++ b/tests/testdata/bench/no_prompt_by_default.out @@ -5,6 +5,6 @@ Runtime | Deno [WILDCARD] ([WILDCARD]) benchmark time/iter (avg) iter/s (min … max) p75 p99 p995 ----------- ----------------------------- --------------------- -------------------------- -no prompt error: PermissionDenied: Requires read access to "./some_file.txt", run again with the --allow-read flag +no prompt error: NotCapable: Requires read access to "./some_file.txt", run again with the --allow-read flag [WILDCARD] error: Bench failed diff --git a/tests/testdata/bench/no_prompt_with_denied_perms.out b/tests/testdata/bench/no_prompt_with_denied_perms.out index 0d1e41077..81db3068a 100644 --- a/tests/testdata/bench/no_prompt_with_denied_perms.out +++ b/tests/testdata/bench/no_prompt_with_denied_perms.out @@ -5,6 +5,6 @@ Runtime | Deno [WILDCARD] ([WILDCARD]) benchmark time/iter (avg) iter/s (min … max) p75 p99 p995 ----------- ----------------------------- --------------------- -------------------------- -no prompt error: PermissionDenied: Requires read access to "./some_file.txt", run again with the --allow-read flag +no prompt error: NotCapable: Requires read access to "./some_file.txt", run again with the --allow-read flag [WILDCARD] error: Bench failed -- cgit v1.2.3