diff options
Diffstat (limited to 'runtime/ops/os.rs')
-rw-r--r-- | runtime/ops/os.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/ops/os.rs b/runtime/ops/os.rs index 70d429839..14c4229a1 100644 --- a/runtime/ops/os.rs +++ b/runtime/ops/os.rs @@ -61,10 +61,11 @@ fn noop_op() -> Result<(), AnyError> { #[op] fn op_exec_path(state: &mut OpState) -> Result<String, AnyError> { let current_exe = env::current_exe().unwrap(); - state - .borrow_mut::<Permissions>() - .read - .check_blind(¤t_exe, "exec_path")?; + state.borrow_mut::<Permissions>().read.check_blind( + ¤t_exe, + "exec_path", + "Deno.execPath()", + )?; // Now apply URL parser to current exe to get fully resolved path, otherwise // we might get `./` and `../` bits in `exec_path` let exe_url = Url::from_file_path(current_exe).unwrap(); |