fix panic

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-03-05 16:56:38 +03:00
parent fb665f0d99
commit fbdb6e332b

View File

@ -80,9 +80,10 @@ func (c *vaultConfig) Init(opts ...config.Option) error {
}) })
if err != nil && !c.opts.AllowFail { if err != nil && !c.opts.AllowFail {
return err return err
} } else if err == nil {
token = rsp.Auth.ClientToken token = rsp.Auth.ClientToken
} }
}
cli.SetToken(token) cli.SetToken(token)
c.cli = cli c.cli = cli