fix: match Force/NoInput where needed
continuous-integration/drone/push Build is passing Details

This commit is contained in:
decentral1se 2022-03-12 16:15:20 +01:00
parent a8f35bdf2f
commit f39e186b66
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
3 changed files with 4 additions and 3 deletions

View File

@ -126,7 +126,7 @@ var appRemoveCommand = cli.Command{
if len(vols) > 0 {
if Volumes {
var removeVols []string
if !internal.Force {
if !internal.Force && !internal.NoInput {
volumesPrompt := &survey.MultiSelect{
Message: "which volumes do you want to remove?",
Help: "'x' indicates selected, enter / return to confirm, ctrl-c to exit, vim mode is enabled",
@ -138,6 +138,7 @@ var appRemoveCommand = cli.Command{
logrus.Fatal(err)
}
}
for _, vol := range removeVols {
err := cl.VolumeRemove(context.Background(), vol, internal.Force) // last argument is for force removing
if err != nil {

View File

@ -126,7 +126,7 @@ recipes.
var chosenDowngrade string
if !internal.Chaos {
if internal.Force {
if internal.Force || internal.NoInput {
chosenDowngrade = availableDowngrades[0]
logrus.Debugf("choosing %s as version to downgrade to (--force)", chosenDowngrade)
} else {

View File

@ -129,7 +129,7 @@ recipes.
var chosenUpgrade string
if len(availableUpgrades) > 0 && !internal.Chaos {
if internal.Force {
if internal.Force || internal.NoInput {
chosenUpgrade = availableUpgrades[len(availableUpgrades)-1]
logrus.Debugf("choosing %s as version to upgrade to", chosenUpgrade)
} else {