diff options
| author | dubiousjim <dubiousjim@gmail.com> | 2020-03-20 16:03:04 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-20 16:03:04 -0400 |
| commit | 77a44163fb22139a8269eb216014640aaf7a7fa8 (patch) | |
| tree | 30d7973a4bfbfb36fab385b039ef60574178af2c /cli/ops | |
| parent | b22f48970fc18c4e5fd72df15ac798477fbe49cb (diff) | |
chmod should throw on Windows (#4446)
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 416ae210a..7e526d71e 100644 --- a/cli/ops/fs.rs +++ b/cli/ops/fs.rs @@ -353,14 +353,15 @@ fn op_chmod( use std::os::unix::fs::PermissionsExt; let permissions = PermissionsExt::from_mode(mode); std::fs::set_permissions(&path, permissions)?; + Ok(json!({})) } // TODO Implement chmod for Windows (#4357) #[cfg(not(unix))] { // Still check file/dir exists on Windows let _metadata = std::fs::metadata(&path)?; + return Err(OpError::not_implemented()); } - Ok(json!({})) }) } |
