mirror of
https://github.com/kopia/kopia.git
synced 2026-04-25 00:18:32 -04:00
refactor(cli): do not run auto-maintenance after a command fails (#4168)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user