diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-05-04 14:23:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-04 14:23:06 -0400 |
commit | 6c02b061ce157b9fc3d20f9bcace0bc6638290d3 (patch) | |
tree | 811310674a76ee8ce5761cec3ee711012e542fcf /cli/ops | |
parent | 191c59a5912121fb9062aff6a08b1cc110674044 (diff) |
stabilize Deno.cwd and require --allow-read (#5068)
Diffstat (limited to 'cli/ops')
-rw-r--r-- | cli/ops/fs.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/ops/fs.rs b/cli/ops/fs.rs index cccf32c12..573058d70 100644 --- a/cli/ops/fs.rs +++ b/cli/ops/fs.rs @@ -905,11 +905,12 @@ fn op_utime( } fn op_cwd( - _state: &State, + state: &State, _args: Value, _zero_copy: Option<ZeroCopyBuf>, ) -> Result<JsonOp, OpError> { let path = current_dir()?; + state.check_read(&path)?; let path_str = into_string(path.into_os_string())?; Ok(JsonOp::Sync(json!(path_str))) } |