Skip to content

Commit

Permalink
chore: remove utils::cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gakonst committed Dec 4, 2021
1 parent 2c9099e commit ee36638
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 3 additions & 1 deletion cli/src/forge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ fn main() -> eyre::Result<()> {
}
Subcommands::Clean { root } => {
let root = root.unwrap_or_else(|| std::env::current_dir().unwrap());
utils::cleanup(root)?;
let paths = ProjectPathsConfig::builder().root(&root).build()?;
let project = Project::builder().paths(paths).build()?;
project.cleanup()?;
}
}

Expand Down
6 changes: 0 additions & 6 deletions cli/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,3 @@ pub fn find_dapp_json_contract(path: &str, name: &str) -> eyre::Result<Contract>

Ok(serde_json::from_value(contract)?)
}

pub fn cleanup(root: PathBuf) -> eyre::Result<()> {
std::fs::remove_dir_all(root.join("cache"))?;
std::fs::remove_dir_all(root.join("out"))?;
Ok(())
}

0 comments on commit ee36638

Please sign in to comment.