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/run/059_fs_relative_path_perm.ts.out | 2 +- tests/testdata/run/089_run_allow_list.ts.out | 2 +- tests/testdata/run/node_env_var_allowlist.ts.out | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/testdata/run') diff --git a/tests/testdata/run/059_fs_relative_path_perm.ts.out b/tests/testdata/run/059_fs_relative_path_perm.ts.out index b23628cd6..0d0412208 100644 --- a/tests/testdata/run/059_fs_relative_path_perm.ts.out +++ b/tests/testdata/run/059_fs_relative_path_perm.ts.out @@ -1,4 +1,4 @@ -[WILDCARD]error: Uncaught (in promise) PermissionDenied: Requires read access to "non-existent", run again with the --allow-read flag +[WILDCARD]error: Uncaught (in promise) NotCapable: Requires read access to "non-existent", run again with the --allow-read flag Deno.readFileSync("non-existent"); ^ at [WILDCARD] diff --git a/tests/testdata/run/089_run_allow_list.ts.out b/tests/testdata/run/089_run_allow_list.ts.out index 68a4a2ac5..8b07d6e04 100644 --- a/tests/testdata/run/089_run_allow_list.ts.out +++ b/tests/testdata/run/089_run_allow_list.ts.out @@ -1,3 +1,3 @@ -[WILDCARD]PermissionDenied: Requires run access to "ls", run again with the --allow-run flag +[WILDCARD]NotCapable: Requires run access to "ls", run again with the --allow-run flag [WILDCARD] true diff --git a/tests/testdata/run/node_env_var_allowlist.ts.out b/tests/testdata/run/node_env_var_allowlist.ts.out index ea66a2965..2dcffd67b 100644 --- a/tests/testdata/run/node_env_var_allowlist.ts.out +++ b/tests/testdata/run/node_env_var_allowlist.ts.out @@ -1,5 +1,5 @@ ok -[WILDCARD]error: Uncaught (in promise) PermissionDenied: Requires env access to "NOT_NODE_DEBUG", run again with the --allow-env flag +[WILDCARD]error: Uncaught (in promise) NotCapable: Requires env access to "NOT_NODE_DEBUG", run again with the --allow-env flag Deno.env.get("NOT_NODE_DEBUG"); ^ at [WILDCARD] -- cgit v1.2.3