Fix non-release builds
This commit is contained in:
parent
4f199d5d35
commit
d28b66a2a7
1 changed files with 27 additions and 16 deletions
13
build.rs
13
build.rs
|
|
@ -60,6 +60,7 @@ fn main() {
|
|||
}
|
||||
set_current_dir(&starting_dir);
|
||||
|
||||
if var("PROFILE").unwrap() == "release" {
|
||||
// FIXME: Deduplicate this with the initial walk all .rs pattern
|
||||
for entry in fs::read_dir(alt_target.join("wasm32-wasi/release/")).unwrap() {
|
||||
let entry = entry.unwrap().path();
|
||||
|
|
@ -75,7 +76,17 @@ fn main() {
|
|||
entry.file_name().unwrap().to_string_lossy()
|
||||
))
|
||||
.status()
|
||||
.unwrap();
|
||||
.unwrap_or_else(|_| {
|
||||
Command::new("cp")
|
||||
.arg(entry.as_os_str())
|
||||
.arg(format!(
|
||||
"assets/plugins/{}",
|
||||
entry.file_name().unwrap().to_string_lossy()
|
||||
))
|
||||
.status()
|
||||
.unwrap()
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue