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 --- ext/node/polyfills/_process/process.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/node/polyfills/_process') diff --git a/ext/node/polyfills/_process/process.ts b/ext/node/polyfills/_process/process.ts index e4b88a11a..6f69139c9 100644 --- a/ext/node/polyfills/_process/process.ts +++ b/ext/node/polyfills/_process/process.ts @@ -53,8 +53,8 @@ function denoEnvGet(name: string) { } catch (e) { if ( ObjectPrototypeIsPrototypeOf(TypeErrorPrototype, e) || - // TODO(iuioiua): Use `PermissionDeniedPrototype` when it's available - ObjectPrototypeIsPrototypeOf(Deno.errors.PermissionDenied.prototype, e) + // TODO(iuioiua): Use `NotCapablePrototype` when it's available + ObjectPrototypeIsPrototypeOf(Deno.errors.NotCapable.prototype, e) ) { return undefined; } -- cgit v1.2.3