summaryrefslogtreecommitdiff
path: root/runtime/ops/runtime.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-09-27 22:36:33 +0200
committerGitHub <noreply@github.com>2022-09-27 22:36:33 +0200
commit212b7dd6da487c070229b6348ec7907b4fecbcf9 (patch)
tree3eb743f90e8b293182a830722eb4ff26bec72039 /runtime/ops/runtime.rs
parenta344368603063bcb281e743f3810ca1e4e46e85d (diff)
feat: Add requesting API name to permission prompt (#15936)
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
Diffstat (limited to 'runtime/ops/runtime.rs')
-rw-r--r--runtime/ops/runtime.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/ops/runtime.rs b/runtime/ops/runtime.rs
index d12dfab96..f6ae0146c 100644
--- a/runtime/ops/runtime.rs
+++ b/runtime/ops/runtime.rs
@@ -26,10 +26,11 @@ fn op_main_module(state: &mut OpState) -> Result<String, AnyError> {
let main_path = std::env::current_dir()
.context("Failed to get current working directory")?
.join(main_url.to_string());
- state
- .borrow_mut::<Permissions>()
- .read
- .check_blind(&main_path, "main_module")?;
+ state.borrow_mut::<Permissions>().read.check_blind(
+ &main_path,
+ "main_module",
+ "Deno.mainModule",
+ )?;
}
Ok(main)
}