fix manganis assets overlapping between examples

This commit is contained in:
Evan Almloff committed 2024-03-11 17:11:52 -05:00
1 parent 44d09fcd2d
commit 6b84f284c9
8 files changed
+96 -109

No files matched your search

+12 -18
View File
@@ -8,7 +8,6 @@ use crate::{
BuildResult, Result,
};
use dioxus_cli_config::CrateConfig;
use dioxus_cli_config::ExecutableType;
use dioxus_hot_reload::HotReloadMsg;
use dioxus_html::HtmlCtx;
@@ -224,24 +223,19 @@ fn start_desktop(
// Only used for the fullstack platform,
let result = crate::builder::build_desktop(config, true, skip_assets, rust_flags)?;
match &config.executable {
ExecutableType::Binary(name)
| ExecutableType::Lib(name)
| ExecutableType::Example(name) => {
let mut file = config.out_dir().join(name);
if cfg!(windows) {
file.set_extension("exe");
}
let active = "DIOXUS_ACTIVE";
let child = RAIIChild(
Command::new(file.to_str().unwrap())
.env(active, "true")
.spawn()?,
);
let active = "DIOXUS_ACTIVE";
let child = RAIIChild(
Command::new(
result
.executable
.clone()
.ok_or(anyhow::anyhow!("No executable found after desktop build"))?,
)
.env(active, "true")
.spawn()?,
);
Ok((child, result))
}
}
Ok((child, result))
}
pub(crate) struct DesktopPlatform {
+1 -1
View File
@@ -137,7 +137,7 @@ async fn setup_file_watcher<F: Fn() -> Result<BuildResult> + Send + 'static>(
&config.crate_dir.join(sub_path),
notify::RecursiveMode::Recursive,
) {
log::error!("Failed to watch path: {}", err);
log::warn!("Failed to watch path: {}", err);
}
}
Ok(watcher)