瀏覽代碼

avm: Use `#[cfg(unix)]` when running UNIX-only functionality (#3464)

acheron 9 月之前
父節點
當前提交
8eec2e3b0d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      avm/src/lib.rs

+ 1 - 1
avm/src/lib.rs

@@ -273,7 +273,7 @@ pub fn install_version(
         fs::write(&bin_path, res.bytes()?)?;
 
         // Set file to executable on UNIX
-        #[cfg(not(target_os = "windows"))]
+        #[cfg(unix)]
         fs::set_permissions(
             bin_path,
             <fs::Permissions as std::os::unix::fs::PermissionsExt>::from_mode(0o775),