From cefad74e22c9d2af8b91e05393427eb7cd85274f Mon Sep 17 00:00:00 2001 From: knoflook Date: Wed, 11 Aug 2021 12:49:53 +0200 Subject: [PATCH] fix: app rm removing secrets and volumes twice --- cli/app/remove.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/app/remove.go b/cli/app/remove.go index a04e0586..1c9adaa4 100644 --- a/cli/app/remove.go +++ b/cli/app/remove.go @@ -79,14 +79,14 @@ var appRemoveCommand = &cli.Command{ } secrets := make(map[string]string) - secretNames := []string{} + var secretNames []string for _, cont := range secretList { secrets[cont.Spec.Annotations.Name] = cont.ID // we have to map the names to ID's secretNames = append(secretNames, cont.Spec.Annotations.Name) } - secretNamesToRemove := secretNames + var secretNamesToRemove []string if !internal.Force { secretsPrompt := &survey.MultiSelect{ Message: "Which secrets do you want to remove?", @@ -116,13 +116,13 @@ var appRemoveCommand = &cli.Command{ logrus.Fatal(err) } - vols := []string{} + var vols []string for _, vol := range volumeList { vols = append(vols, vol.Name) } if Volumes { - removeVols := vols + var removeVols []string if !internal.Force { volumesPrompt := &survey.MultiSelect{ Message: "Which volumes do you want to remove?",