File: path.go

package info (click to toggle)
golang-github-smallstep-cli 0.15.16%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,404 kB
  • sloc: sh: 512; makefile: 99
file content (26 lines) | stat: -rw-r--r-- 590 bytes parent folder | download | duplicates (2)
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)
}