fix: app rm removing secrets and volumes twice
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
edd0b1e098
commit
cefad74e22
@ -79,14 +79,14 @@ var appRemoveCommand = &cli.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
secrets := make(map[string]string)
|
secrets := make(map[string]string)
|
||||||
secretNames := []string{}
|
var secretNames []string
|
||||||
|
|
||||||
for _, cont := range secretList {
|
for _, cont := range secretList {
|
||||||
secrets[cont.Spec.Annotations.Name] = cont.ID // we have to map the names to ID's
|
secrets[cont.Spec.Annotations.Name] = cont.ID // we have to map the names to ID's
|
||||||
secretNames = append(secretNames, cont.Spec.Annotations.Name)
|
secretNames = append(secretNames, cont.Spec.Annotations.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
secretNamesToRemove := secretNames
|
var secretNamesToRemove []string
|
||||||
if !internal.Force {
|
if !internal.Force {
|
||||||
secretsPrompt := &survey.MultiSelect{
|
secretsPrompt := &survey.MultiSelect{
|
||||||
Message: "Which secrets do you want to remove?",
|
Message: "Which secrets do you want to remove?",
|
||||||
@ -116,13 +116,13 @@ var appRemoveCommand = &cli.Command{
|
|||||||
logrus.Fatal(err)
|
logrus.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
vols := []string{}
|
var vols []string
|
||||||
for _, vol := range volumeList {
|
for _, vol := range volumeList {
|
||||||
vols = append(vols, vol.Name)
|
vols = append(vols, vol.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
if Volumes {
|
if Volumes {
|
||||||
removeVols := vols
|
var removeVols []string
|
||||||
if !internal.Force {
|
if !internal.Force {
|
||||||
volumesPrompt := &survey.MultiSelect{
|
volumesPrompt := &survey.MultiSelect{
|
||||||
Message: "Which volumes do you want to remove?",
|
Message: "Which volumes do you want to remove?",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user