diff options
author | Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> | 2024-09-16 13:43:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-16 13:43:52 -0700 |
commit | e81c67ba227b00ccde495fb0afb6ae14f69a3a30 (patch) | |
tree | 3b167411659ce918a1da5248fea139070fa8e0c2 /runtime/ops | |
parent | 62e952559f600e72d7498c9b12f906cb0b1ba150 (diff) |
feat(permissions): `Deno.mainModule` doesn't require permissions (#25667)
Closes https://github.com/denoland/deno/issues/7315.
Diffstat (limited to 'runtime/ops')
-rw-r--r-- | runtime/ops/runtime.rs | 7 |
1 files changed, 0 insertions, 7 deletions
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<String, AnyError> { let main_url = state.borrow::<ModuleSpecifier>(); let main_path = main_url.to_string(); - if main_url.scheme() == "file" { - let main_path = main_url.to_file_path().unwrap(); - state - .borrow_mut::<PermissionsContainer>() - .check_read_blind(&main_path, "main_module", "Deno.mainModule")?; - } Ok(main_path) } |