mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
fix(cli): standalone bin corruption on M1 (#10311)
This commit is contained in:
parent
6824ffb999
commit
2d722832c4
1 changed files with 4 additions and 0 deletions
|
@ -170,6 +170,10 @@ pub async fn write_standalone_binary(
|
|||
if !has_trailer {
|
||||
bail!("Could not compile: cannot overwrite {:?}.", &output);
|
||||
}
|
||||
|
||||
// Remove file if it was indeed a deno compiled binary, to avoid corruption
|
||||
// (see https://github.com/denoland/deno/issues/10310)
|
||||
std::fs::remove_file(&output)?;
|
||||
}
|
||||
tokio::fs::write(&output, final_bin).await?;
|
||||
#[cfg(unix)]
|
||||
|
|
Loading…
Reference in a new issue