From e81c67ba227b00ccde495fb0afb6ae14f69a3a30 Mon Sep 17 00:00:00 2001 From: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Date: Mon, 16 Sep 2024 13:43:52 -0700 Subject: feat(permissions): `Deno.mainModule` doesn't require permissions (#25667) Closes https://github.com/denoland/deno/issues/7315. --- runtime/ops/runtime.rs | 7 ------- 1 file changed, 7 deletions(-) (limited to 'runtime/ops/runtime.rs') diff --git a/runtime/ops/runtime.rs b/runtime/ops/runtime.rs index 306e6ce8f..419274ebd 100644 --- a/runtime/ops/runtime.rs +++ b/runtime/ops/runtime.rs @@ -4,7 +4,6 @@ use deno_core::error::AnyError; use deno_core::op2; use deno_core::ModuleSpecifier; use deno_core::OpState; -use deno_permissions::PermissionsContainer; deno_core::extension!( deno_runtime, @@ -20,12 +19,6 @@ deno_core::extension!( fn op_main_module(state: &mut OpState) -> Result { let main_url = state.borrow::(); let main_path = main_url.to_string(); - if main_url.scheme() == "file" { - let main_path = main_url.to_file_path().unwrap(); - state - .borrow_mut::() - .check_read_blind(&main_path, "main_module", "Deno.mainModule")?; - } Ok(main_path) } -- cgit v1.2.3