Skip to content

Commit

Permalink
fix: Windows compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
mistydemeo committed Jan 18, 2024
1 parent 2d2acc4 commit 5abb219
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
use std::{
env::{self, args, current_dir},
fs::File,
};
use std::env::{self, args, current_dir};

#[cfg(unix)]
use std::os::unix::fs::PermissionsExt;
use std::{fs::File, os::unix::fs::PermissionsExt};

use axoasset::{AxoassetError, LocalAsset, SourceFile};
use axoprocess::{AxoprocessError, Cmd};
Expand Down Expand Up @@ -139,9 +136,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)?;
Expand Down

0 comments on commit 5abb219

Please sign in to comment.