Skip to content

Commit

Permalink
Run conda clean after conda upgrade if cleanup = true
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkapur committed Feb 20, 2025
1 parent fa3e472 commit 477a7e0
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/steps/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,12 +517,23 @@ pub fn run_conda_update(ctx: &ExecutionContext) -> Result<()> {

print_separator("Conda");

let mut command = ctx.run_type().execute(conda);
let mut command = ctx.run_type().execute(&conda);
command.args(["update", "--all", "-n", "base"]);
if ctx.config().yes(Step::Conda) {
command.arg("--yes");
}
command.status_checked()
command.status_checked()?;

if ctx.config().cleanup() {
let mut command = ctx.run_type().execute(conda);
command.args(["clean", "--all"]);
if ctx.config().yes(Step::Conda) {
command.arg("--yes");
}
command.status_checked()?;
}

Ok(())
}

pub fn run_pixi_update(ctx: &ExecutionContext) -> Result<()> {
Expand Down

0 comments on commit 477a7e0

Please sign in to comment.