From f464e30feef1f80a65b2c9dfc9fad5246ed69237 Mon Sep 17 00:00:00 2001 From: Jim Kalafut Date: Fri, 5 Oct 2018 16:05:26 -0700 Subject: [PATCH] Fix 'vault auth' panic (#5473) Running 'vault auth' with no parameters was panicking: panic: assignment to entry in nil map github.com/hashicorp/vault/command/login.go:255 +0xdee Now it will show help. --- command/auth.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/command/auth.go b/command/auth.go index d51c067b1076..78daf6d53d97 100644 --- a/command/auth.go +++ b/command/auth.go @@ -62,6 +62,10 @@ func (c *AuthCommand) Run(args []string) int { // Deprecation // TODO: remove in 0.9.0 + if len(args) == 0 { + return cli.RunResultHelp + } + // Parse the args for our deprecations and defer to the proper areas. for _, arg := range args { switch {