From 0cd92eae65b31cdbaa19e3cccb0e3234196a6d17 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Tue, 26 Mar 2019 13:55:19 -0400 Subject: Resolve review comments Signed-off-by: Matthew Heon --- cmd/podman/shared/create.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'cmd') diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go index fc55e6f17..5f7263cb6 100644 --- a/cmd/podman/shared/create.go +++ b/cmd/podman/shared/create.go @@ -357,10 +357,8 @@ func ParseCreateOpts(ctx context.Context, c *cliconfig.PodmanCommand, runtime *l return nil, errors.Errorf("--cpu-quota and --cpus cannot be set together") } - if c.Flag("no-hosts").Changed && c.Flag("add-host").Changed { - if c.Bool("no-hosts") { - return nil, errors.Errorf("--no-hosts and --add-host cannot be set together") - } + if c.Bool("no-hosts") && c.Flag("add-host").Changed { + return nil, errors.Errorf("--no-hosts and --add-host cannot be set together") } // EXPOSED PORTS -- cgit v1.2.3-54-g00ecf