diff --git a/src/lib.rs b/src/lib.rs index b3a00fb..aed23c6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -139,9 +139,10 @@ impl AxoUpdater { }; let installer_path = Utf8PathBuf::try_from(tempdir.path().join("installer"))?; - let installer_file = File::create(&installer_path)?; - if cfg!(unix) { + #[cfg(unix)] + { + let installer_file = File::create(&installer_path)?; let mut perms = installer_file.metadata()?.permissions(); perms.set_mode(0o744); installer_file.set_permissions(perms)?;