summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorumohnani8 <umohnani@redhat.com>2018-05-02 12:26:55 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-05-02 16:55:31 +0000
commit03753712fc687928633343a0fdfec6fdfbe27446 (patch)
tree9e732eb76b117a04392d279c19575b087533810b
parent970eaf003328cab69aa4ccaa78cf908f5a87fff0 (diff)
downloadpodman-03753712fc687928633343a0fdfec6fdfbe27446.tar.gz
podman-03753712fc687928633343a0fdfec6fdfbe27446.tar.bz2
podman-03753712fc687928633343a0fdfec6fdfbe27446.zip
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 <umohnani@redhat.com> Closes: #712 Approved by: rhatdan
-rw-r--r--cmd/podman/logout.go4
1 files changed, 2 insertions, 2 deletions
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