Skip to content

Commit

Permalink
fix: cleanup build info path (#2730)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xalpharush committed Feb 7, 2024
1 parent 79cdcf5 commit 4d267f7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ethers-solc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,11 +474,18 @@ impl<T: ArtifactOutput> Project<T> {
}
tracing::trace!("removed cache file \"{}\"", self.cache_path().display());
}
if self.paths.artifacts.exists() {
if self.artifacts_path().exists() {
std::fs::remove_dir_all(self.artifacts_path())
.map_err(|err| SolcIoError::new(err, self.artifacts_path().clone()))?;
tracing::trace!("removed artifacts dir \"{}\"", self.artifacts_path().display());
}

if self.build_info_path().exists() {
std::fs::remove_dir_all(self.build_info_path())
.map_err(|err| SolcIoError::new(err, self.build_info_path().clone()))?;
tracing::trace!("removed build-info dir \"{}\"", self.build_info_path().display());
}

Ok(())
}

Expand Down

0 comments on commit 4d267f7

Please sign in to comment.