mirror of https://github.com/docker/cli.git
Allow --detach and --quiet flags when using --rollback
Commit 78c204ef79
added
(f9bd8ec8b268581f93095c5a80679f0a8ff498bf in the moby repo)
a validation to prevent `--rollback` from being used
in combination with other flags that update the
service spec.
This validation was not taking into account that
some flags only affect the CLI behavior, and
are okay to be used when rolling back.
This patch updates the validation, and adds
`--quiet` and `--detach` to the list of allowed
flags.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
efaadcf465
commit
f10f29df8d
|
@ -131,7 +131,7 @@ func runUpdate(dockerCli *command.DockerCli, flags *pflag.FlagSet, options *serv
|
||||||
// Rollback can't be combined with other flags.
|
// Rollback can't be combined with other flags.
|
||||||
otherFlagsPassed := false
|
otherFlagsPassed := false
|
||||||
flags.VisitAll(func(f *pflag.Flag) {
|
flags.VisitAll(func(f *pflag.Flag) {
|
||||||
if f.Name == "rollback" {
|
if f.Name == "rollback" || f.Name == "detach" || f.Name == "quiet" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if flags.Changed(f.Name) {
|
if flags.Changed(f.Name) {
|
||||||
|
|
Loading…
Reference in New Issue