refactor(cli): do not run auto-maintenance after a command fails (#4168)

This commit is contained in:
Julio López
2024-10-14 10:17:11 -07:00
committed by GitHub
parent 58bcb29d1a
commit 2ca59394c1

View File

@@ -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)
}