summaryrefslogtreecommitdiff
path: root/runtime/ops/process.rs
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ops/process.rs')
-rw-r--r--runtime/ops/process.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/ops/process.rs b/runtime/ops/process.rs
index e4b614030..88c130e61 100644
--- a/runtime/ops/process.rs
+++ b/runtime/ops/process.rs
@@ -144,7 +144,10 @@ struct RunInfo {
#[op]
fn op_run(state: &mut OpState, run_args: RunArgs) -> Result<RunInfo, AnyError> {
let args = run_args.cmd;
- state.borrow_mut::<Permissions>().run.check(&args[0])?;
+ state
+ .borrow_mut::<Permissions>()
+ .run
+ .check(&args[0], Some("Deno.run()"))?;
let env = run_args.env;
let cwd = run_args.cwd;
@@ -348,8 +351,12 @@ fn op_kill(
state: &mut OpState,
pid: i32,
signal: String,
+ api_name: String,
) -> Result<(), AnyError> {
- state.borrow_mut::<Permissions>().run.check_all()?;
+ state
+ .borrow_mut::<Permissions>()
+ .run
+ .check_all(Some(&api_name))?;
kill(pid, &signal)?;
Ok(())
}