mirror of
https://github.com/lune-org/lune.git
synced 2025-04-19 19:34:02 +01:00
fix(windows): write file differently for windows
This commit is contained in:
parent
4bb0eba589
commit
6087069493
1 changed files with 12 additions and 8 deletions
|
@ -44,6 +44,7 @@ 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) {
|
||||||
OpenOptions::new()
|
OpenOptions::new()
|
||||||
.write(true)
|
.write(true)
|
||||||
.create(true)
|
.create(true)
|
||||||
|
@ -52,6 +53,9 @@ pub async fn build_standalone<T: AsRef<Path> + Into<PathBuf>>(
|
||||||
.await?
|
.await?
|
||||||
.write_all(&patched_bin)
|
.write_all(&patched_bin)
|
||||||
.await?;
|
.await?;
|
||||||
|
} else if cfg!(windows) {
|
||||||
|
fs::write(output_path, &patched_bin).await?;
|
||||||
|
}
|
||||||
|
|
||||||
Ok(ExitCode::SUCCESS)
|
Ok(ExitCode::SUCCESS)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue