1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
package path
import (
"fmt"
"github.com/smallstep/cli/command"
"github.com/smallstep/cli/config"
"github.com/urfave/cli"
)
func init() {
cmd := cli.Command{
Name: "path",
Usage: "print the configured step path and exit",
UsageText: "step path",
Description: `**step path** command prints the configured step path and exits.
The default step path of $HOME/.step can be overridden with the **STEPPATH** environment variable.`,
Action: cli.ActionFunc(func(ctx *cli.Context) error {
fmt.Println(config.StepPath())
return nil
}),
}
command.Register(cmd)
}
|