From 93603e3d8f55c07798a54fba531279c1f14ccb3b Mon Sep 17 00:00:00 2001 From: Victor Colombo Date: Fri, 13 Oct 2023 13:16:13 +0100 Subject: [PATCH] feat: Unused images are cleaned even without -a flag --- cli/cli/commands/clean/clean.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/cli/cli/commands/clean/clean.go b/cli/cli/commands/clean/clean.go index 79238e84d5..34da387113 100644 --- a/cli/cli/commands/clean/clean.go +++ b/cli/cli/commands/clean/clean.go @@ -89,21 +89,8 @@ func run( }, } - executeOnlyIfAllFlagIsEnabled := map[string]bool{ - oldEngineCleaningPhaseTitle: false, - enclavesCleaningPhaseTitle: false, - unusedImagesPhaseTitle: true, - } - phasesWithErrors := []string{} for phaseTitle, cleaningFunc := range cleaningPhaseFunctions { - onlyIfAllFlag, found := executeOnlyIfAllFlagIsEnabled[phaseTitle] - if !found { - return stacktrace.NewError("Couldn't find phase %s in executeOnlyIfAllFlagIsEnabled. This is a bug in Kurtosis", phaseTitle) - } - if onlyIfAllFlag && !shouldCleanAll { - continue - } logrus.Infof("Cleaning %v...", phaseTitle) successfullyRemovedArtifactUuids, removalErrors, err := cleaningFunc() if err != nil {