From 2ca59394c17fb13d7691e02fe33cc4cb1e13bb4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20L=C3=B3pez?= <1953782+julio-lopez@users.noreply.github.com> Date: Mon, 14 Oct 2024 10:17:11 -0700 Subject: [PATCH] refactor(cli): do not run auto-maintenance after a command fails (#4168) --- cli/app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/app.go b/cli/app.go index 17a492765..430835752 100644 --- a/cli/app.go +++ b/cli/app.go @@ -564,7 +564,7 @@ func (c *App) maybeRepositoryAction(act func(ctx context.Context, rep repo.Repos err = act(ctx, rep) - if rep != nil && !mode.disableMaintenance { + if rep != nil && err == nil && !mode.disableMaintenance { if merr := c.maybeRunMaintenance(ctx, rep); merr != nil { log(ctx).Errorf("error running maintenance: %v", merr) }