Use smallstep/cli-utils instead of smallstep/cli

This commit is contained in:
Mariano Cano 2020-10-29 13:10:03 -07:00
parent fb18e5afc4
commit 40d0596b71
15 changed files with 58 additions and 479 deletions

View file

@ -13,8 +13,8 @@ import (
"github.com/pkg/errors"
"github.com/smallstep/certificates/authority"
"github.com/smallstep/certificates/ca"
"github.com/smallstep/cli/errs"
"github.com/urfave/cli"
"go.step.sm/cli-utils/errs"
)
// AppCommand is the action used as the top action.

View file

@ -12,11 +12,11 @@ import (
"github.com/smallstep/certificates/authority"
"github.com/smallstep/certificates/ca"
"github.com/smallstep/certificates/pki"
"github.com/smallstep/cli/command"
"github.com/smallstep/cli/errs"
"github.com/smallstep/cli/ui"
"github.com/smallstep/cli/utils"
"github.com/urfave/cli"
"go.step.sm/cli-utils/command"
"go.step.sm/cli-utils/errs"
"go.step.sm/cli-utils/fileutil"
"go.step.sm/cli-utils/ui"
"go.step.sm/crypto/randutil"
)
@ -199,7 +199,7 @@ func onboardPKI(config onboardingConfiguration) (*authority.Config, string, erro
if err != nil {
return nil, "", errors.Wrapf(err, "error marshaling %s", p.GetCAConfigPath())
}
if err = utils.WriteFile(p.GetCAConfigPath(), b, 0666); err != nil {
if err = fileutil.WriteFile(p.GetCAConfigPath(), b, 0666); err != nil {
return nil, "", errs.FileError(err, p.GetCAConfigPath())
}