Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
[evm][move package] remove build dir before starting a new build
Browse files Browse the repository at this point in the history
  • Loading branch information
vgao1996 committed May 5, 2022
1 parent 260f0a6 commit d0ae5c5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions language/tools/move-package/src/compilation/build_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,16 @@ impl BuildPlan {
package_names
)?;

if let Err(err) = std::fs::remove_dir_all(&build_root_path) {
writeln!(
writer,
"{} Failed to remove build dir {}",
"ERROR".bold().red(),
build_root_path.to_string_lossy(),
)?;

return Err(err.into());
}
if let Err(err) = std::fs::create_dir_all(&build_root_path) {
writeln!(
writer,
Expand Down

0 comments on commit d0ae5c5

Please sign in to comment.