Skip to content

Commit

Permalink
fix bug in make.rs
Browse files Browse the repository at this point in the history
If a directory does not exist, remove_dir_all will return an error but
we do not care if the directory does not exist. Ignoring all errors in
this case is a simple way to ignore the very common case that directory
does not exist.
  • Loading branch information
webern committed Dec 26, 2023
1 parent f6b4037 commit 6d37283
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion twoliter/src/cmd/make.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl Make {
pub(super) async fn run(&self) -> Result<()> {
let project = project::load_or_find_project(self.project_path.clone()).await?;
let toolsdir = project.project_dir().join("build/tools");
fs::remove_dir_all(&toolsdir).await?;
let _ = fs::remove_dir_all(&toolsdir).await;
install_tools(&toolsdir).await?;
let makefile_path = toolsdir.join("Makefile.toml");
CargoMake::new(&project, &self.arch)?
Expand Down

0 comments on commit 6d37283

Please sign in to comment.