From bbbf9f299c284e24882927d34e13ffad1ed6093e Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sat, 2 May 2020 18:33:43 -0400 Subject: Deno.chdir should require allow-read not allow-write (#5033) --- cli/ops/fs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/ops') diff --git a/cli/ops/fs.rs b/cli/ops/fs.rs index 55ee1afa3..cccf32c12 100644 --- a/cli/ops/fs.rs +++ b/cli/ops/fs.rs @@ -254,7 +254,7 @@ fn op_chdir( ) -> Result { let args: ChdirArgs = serde_json::from_value(args)?; let d = PathBuf::from(&args.directory); - state.check_write(&d)?; + state.check_read(&d)?; set_current_dir(&d)?; Ok(JsonOp::Sync(json!({}))) } -- cgit v1.2.3