Fix raven clean

This commit is contained in:
Cutieguwu
2026-02-15 20:36:54 -05:00
parent a3c208555a
commit cfb6f5fb34
3 changed files with 8 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "core"
version = "0.1.2"
version = "0.1.3"
edition.workspace = true
license.workspace = true

View File

@@ -172,8 +172,12 @@ impl WorkspaceHandler {
}
pub fn clean(&mut self) -> crate::Result<&mut Self> {
std::fs::remove_file(self.project_root.join(F_NEST_LOCK))?;
std::fs::remove_dir_all(Self::DIR_TARGET)?;
if let Err(err) = std::fs::remove_file(self.project_root.join(F_NEST_LOCK)) {
if err.kind() != std::io::ErrorKind::NotFound {
return Err(Error::from(err));
}
}
let _ = std::fs::remove_dir_all(Self::DIR_TARGET);
Ok(self)
}