diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-05-06 15:51:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-06 15:51:33 -0400 |
commit | 221221cc9758225a85ecebb2de206591abf16e68 (patch) | |
tree | e050bc8601d1ab2b6c6a7a44fbeaa0ce40868685 /cli/ops | |
parent | 76c77bb32c642283e61c9a6bb4936401fc43eaba (diff) |
BREAKING: execPath should require allow-read (#5109)
Diffstat (limited to 'cli/ops')
-rw-r--r-- | cli/ops/os.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<ZeroCopyBuf>, ) -> Result<JsonOp, OpError> { - 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(); |