make dx clean clean the new .dioxus directory

This commit is contained in:
Evan Almloff 2023-12-29 15:20:30 -06:00
parent 1683ec8a72
commit 49be972507
2 changed files with 12 additions and 4 deletions

View file

@ -28,6 +28,12 @@ impl Clean {
remove_dir_all(crate_config.crate_dir.join(&out_dir))?;
}
let fullstack_out_dir = crate_config.crate_dir.join(".dioxus");
if fullstack_out_dir.is_dir() {
remove_dir_all(fullstack_out_dir)?;
}
Ok(())
}
}

View file

@ -223,9 +223,11 @@ fn start_desktop(config: &CrateConfig, skip_assets: bool) -> Result<(RAIIChild,
file.set_extension("exe");
}
let active = "DIOXUS_ACTIVE";
let child = RAIIChild(Command::new(file.to_str().unwrap())
.env(active, "true")
.spawn()?);
let child = RAIIChild(
Command::new(file.to_str().unwrap())
.env(active, "true")
.spawn()?,
);
Ok((child, result))
}
@ -273,4 +275,4 @@ impl Drop for RAIIChild {
fn drop(&mut self) {
let _ = self.0.kill();
}
}
}