fix: match Force/NoInput where needed

This commit is contained in:
2022-03-12 16:15:20 +01:00
parent a8f35bdf2f
commit f39e186b66
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 {