mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-17 01:28:44 +00:00
Fix std::fs::copy on Windows
This commit is contained in:
@@ -1209,18 +1209,16 @@ fn link_exe_from_dir(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// remove file if it exists - if not done, can lead to errors on copy
|
// remove file if it exists - if not done, can lead to errors on copy
|
||||||
let _ = std::fs::remove_file(&output_path);
|
let _ = std::fs::remove_file(&normalize_path(&format!("{}", out_path.display())));
|
||||||
std::fs::copy(&out_path, &output_path).map_err(|e| {
|
std::fs::copy(
|
||||||
std::process::Command::new("ls")
|
&normalize_path(&format!("{}", out_path.display())),
|
||||||
.arg(out_path.parent().unwrap())
|
&normalize_path(&format!("{}", output_path.display())),
|
||||||
.stdout(std::process::Stdio::inherit())
|
)
|
||||||
.stderr(std::process::Stdio::inherit())
|
.map_err(|e| {
|
||||||
.output()
|
|
||||||
.unwrap();
|
|
||||||
anyhow::anyhow!(
|
anyhow::anyhow!(
|
||||||
"could not copy from {} to {}: {e}",
|
"could not copy from {} to {}: {e}",
|
||||||
out_path.display(),
|
normalize_path(&format!("{}", out_path.display())),
|
||||||
output_path.display()
|
normalize_path(&format!("{}", output_path.display()))
|
||||||
)
|
)
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user