mirror of
https://github.com/lune-org/lune.git
synced 2025-04-15 09:23:49 +01:00
fix: conditionally compile fs writing system for windows
This commit is contained in:
parent
6087069493
commit
cf2f93d480
1 changed files with 12 additions and 12 deletions
|
@ -44,18 +44,18 @@ pub async fn build_standalone<T: AsRef<Path> + Into<PathBuf>>(
|
||||||
patched_bin.append(&mut signature.clone());
|
patched_bin.append(&mut signature.clone());
|
||||||
|
|
||||||
// Write the compiled binary to file
|
// Write the compiled binary to file
|
||||||
if cfg!(unix) {
|
#[cfg(not(target_os = "windows"))]
|
||||||
OpenOptions::new()
|
OpenOptions::new()
|
||||||
.write(true)
|
.write(true)
|
||||||
.create(true)
|
.create(true)
|
||||||
.mode(0o770)
|
.mode(0o770)
|
||||||
.open(output_path)
|
.open(&output_path)
|
||||||
.await?
|
.await?
|
||||||
.write_all(&patched_bin)
|
.write_all(&patched_bin)
|
||||||
.await?;
|
.await?;
|
||||||
} else if cfg!(windows) {
|
|
||||||
fs::write(output_path, &patched_bin).await?;
|
#[cfg(target_os = "windows")]
|
||||||
}
|
fs::write(&output_path, &patched_bin).await?;
|
||||||
|
|
||||||
Ok(ExitCode::SUCCESS)
|
Ok(ExitCode::SUCCESS)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue