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.
This commit is contained in:
Jim Kalafut 2018-10-05 16:05:26 -07:00 committed by Brian Kassouf
parent a3537350a5
commit c4dc44a920

View File

@ -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 {