Use previous method of getting recovery wrapper

pull/340/head
Jeff Mitchell 6 years ago
parent f8237fb945
commit ff0d49b6e4

@ -18,6 +18,7 @@ import (
"github.com/hashicorp/boundary/api"
"github.com/hashicorp/boundary/api/authtokens"
"github.com/hashicorp/boundary/sdk/recovery"
"github.com/hashicorp/boundary/sdk/wrapper"
"github.com/mitchellh/cli"
"github.com/pkg/errors"
@ -199,7 +200,11 @@ func (c *Command) Client(opt ...Option) (*api.Client, error) {
}
}()
c.client.SetRecoveryKmsWrapper(wrapper)
token, err := recovery.GenerateRecoveryToken(c.Context, wrapper)
if err != nil {
return nil, fmt.Errorf("Error generating recovery config: %w", err)
}
c.client.SetToken(token)
case c.FlagToken != "":
c.client.SetToken(c.FlagToken)

Loading…
Cancel
Save