1
0
mirror of https://github.com/smallstep/cli.git synced 2025-08-09 03:22:43 +03:00

Add flag --force on all commands using utils.WriteFile

Fixes smallstep/ca-component#121
This commit is contained in:
Mariano Cano
2018-11-27 17:36:27 -08:00
parent 1d001f5e28
commit 0cface6e9b
18 changed files with 95 additions and 240 deletions

View File

@@ -9,8 +9,10 @@ import (
"github.com/pkg/errors"
"github.com/urfave/cli"
"github.com/smallstep/cli/command"
"github.com/smallstep/cli/crypto/pemutil"
"github.com/smallstep/cli/errs"
"github.com/smallstep/cli/flags"
"github.com/smallstep/cli/jose"
"github.com/smallstep/cli/utils"
)
@@ -18,7 +20,7 @@ import (
func changePassCommand() cli.Command {
return cli.Command{
Name: "change-pass",
Action: cli.ActionFunc(changePassAction),
Action: command.ActionFunc(changePassAction),
Usage: "Change password of an encrypted private key (PEM or JWK format)",
UsageText: `**step crypto change-pass** <key-file> [**--out**=<file>]`,
Description: `**step crypto change-pass** extracts the private key from
@@ -56,6 +58,7 @@ $ step crypto change-pass key.jwk --out new-key.jwk
Name: "out,output-file",
Usage: "The <file> new encrypted key path. Default to overwriting the <key> positional argument",
},
flags.Force,
},
}
}