Use previous method of getting recovery wrapper

This commit is contained in:
Jeff Mitchell committed 2020-09-09 01:29:35 -04:00
1 parent f8237fb945
commit ff0d49b6e4
1 file changed
+6 -1
+6 -1
View File
@@ -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)