From 03753712fc687928633343a0fdfec6fdfbe27446 Mon Sep 17 00:00:00 2001 From: umohnani8 Date: Wed, 2 May 2018 12:26:55 -0400 Subject: Fix podman logout --all flag podman logout --all should remove cached credentials for all registries in the auth.json file. Before this, it was asking for a registry to be given with the --all flag also. Signed-off-by: umohnani8 Closes: #712 Approved by: rhatdan --- cmd/podman/logout.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd/podman') diff --git a/cmd/podman/logout.go b/cmd/podman/logout.go index cae8ddfb2..25f5aca10 100644 --- a/cmd/podman/logout.go +++ b/cmd/podman/logout.go @@ -36,9 +36,9 @@ var ( func logoutCmd(c *cli.Context) error { args := c.Args() if len(args) > 1 { - return errors.Errorf("too many arguments, logout takes only 1 argument") + return errors.Errorf("too many arguments, logout takes at most 1 argument") } - if len(args) == 0 { + if len(args) == 0 && !c.IsSet("all") { return errors.Errorf("registry must be given") } var server string -- cgit v1.2.3-54-g00ecf