Clean up OPAM if requested (#12)

OPAM has a built-in `clean` command that automatically
removes download caches, logs, and cleans the current
OPAM switch. We should call `opam clean` when the
cleanup flag is set.

Authored-by: Victor Song <vms2@rice.edu>
Approved-by: Thomas Schönauer <t.schoenauer@hgs-wt.at>
This commit is contained in:
DottoDev
2022-10-10 20:24:41 +00:00
committed by GitHub
parent 27349b1571
commit a9d5d24a35
2 changed files with 10 additions and 4 deletions

View File

@@ -318,7 +318,7 @@ fn run() -> Result<()> {
runner.execute(Step::Flutter, "Flutter", || generic::run_flutter_upgrade(run_type))?;
runner.execute(Step::Go, "Go", || generic::run_go(run_type))?;
runner.execute(Step::Emacs, "Emacs", || emacs.upgrade(&ctx))?;
runner.execute(Step::Opam, "opam", || generic::run_opam_update(run_type))?;
runner.execute(Step::Opam, "opam", || generic::run_opam_update(&ctx))?;
runner.execute(Step::Vcpkg, "vcpkg", || generic::run_vcpkg_update(run_type))?;
runner.execute(Step::Pipx, "pipx", || generic::run_pipx_update(run_type))?;
runner.execute(Step::Conda, "conda", || generic::run_conda_update(&ctx))?;