fix: match Force/NoInput where needed
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
a8f35bdf2f
commit
f39e186b66
|
@ -126,7 +126,7 @@ var appRemoveCommand = cli.Command{
|
||||||
if len(vols) > 0 {
|
if len(vols) > 0 {
|
||||||
if Volumes {
|
if Volumes {
|
||||||
var removeVols []string
|
var removeVols []string
|
||||||
if !internal.Force {
|
if !internal.Force && !internal.NoInput {
|
||||||
volumesPrompt := &survey.MultiSelect{
|
volumesPrompt := &survey.MultiSelect{
|
||||||
Message: "which volumes do you want to remove?",
|
Message: "which volumes do you want to remove?",
|
||||||
Help: "'x' indicates selected, enter / return to confirm, ctrl-c to exit, vim mode is enabled",
|
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)
|
logrus.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, vol := range removeVols {
|
for _, vol := range removeVols {
|
||||||
err := cl.VolumeRemove(context.Background(), vol, internal.Force) // last argument is for force removing
|
err := cl.VolumeRemove(context.Background(), vol, internal.Force) // last argument is for force removing
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -126,7 +126,7 @@ recipes.
|
||||||
|
|
||||||
var chosenDowngrade string
|
var chosenDowngrade string
|
||||||
if !internal.Chaos {
|
if !internal.Chaos {
|
||||||
if internal.Force {
|
if internal.Force || internal.NoInput {
|
||||||
chosenDowngrade = availableDowngrades[0]
|
chosenDowngrade = availableDowngrades[0]
|
||||||
logrus.Debugf("choosing %s as version to downgrade to (--force)", chosenDowngrade)
|
logrus.Debugf("choosing %s as version to downgrade to (--force)", chosenDowngrade)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -129,7 +129,7 @@ recipes.
|
||||||
|
|
||||||
var chosenUpgrade string
|
var chosenUpgrade string
|
||||||
if len(availableUpgrades) > 0 && !internal.Chaos {
|
if len(availableUpgrades) > 0 && !internal.Chaos {
|
||||||
if internal.Force {
|
if internal.Force || internal.NoInput {
|
||||||
chosenUpgrade = availableUpgrades[len(availableUpgrades)-1]
|
chosenUpgrade = availableUpgrades[len(availableUpgrades)-1]
|
||||||
logrus.Debugf("choosing %s as version to upgrade to", chosenUpgrade)
|
logrus.Debugf("choosing %s as version to upgrade to", chosenUpgrade)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue