From 6c02b061ce157b9fc3d20f9bcace0bc6638290d3 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 4 May 2020 14:23:06 -0400 Subject: stabilize Deno.cwd and require --allow-read (#5068) --- cli/ops/fs.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cli/ops') 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, ) -> Result { let path = current_dir()?; + state.check_read(&path)?; let path_str = into_string(path.into_os_string())?; Ok(JsonOp::Sync(json!(path_str))) } -- cgit v1.2.3