From 221221cc9758225a85ecebb2de206591abf16e68 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 6 May 2020 15:51:33 -0400 Subject: BREAKING: execPath should require allow-read (#5109) --- cli/ops/os.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/ops/os.rs') diff --git a/cli/ops/os.rs b/cli/ops/os.rs index 5c205f37b..d9a6b3095 100644 --- a/cli/ops/os.rs +++ b/cli/ops/os.rs @@ -82,8 +82,8 @@ fn op_exec_path( _args: Value, _zero_copy: Option, ) -> Result { - state.check_env()?; let current_exe = env::current_exe().unwrap(); + state.check_read(¤t_exe)?; // 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(); -- cgit v1.2.3