Update commands/app.go

Co-authored-by: Mariano Cano <mariano@smallstep.com>
This commit is contained in:
Carl Tashian 2023-01-31 14:39:29 -08:00 committed by GitHub
parent 1c59b3f132
commit b76028f3ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -141,10 +141,13 @@ func appAction(ctx *cli.Context) error {
cfg, err := config.LoadConfiguration(configFile)
if err != nil && token == "" {
var pathErr *os.PathError
if errors.As(err, &pathErr) {
fmt.Println("step-ca can't find or open the configuration file for your CA.")
fmt.Println("You may need to create a CA first by running `step ca init`.")
fmt.Println("Documentation: https://u.step.sm/docs/ca")
fmt.Println("")
os.Exit(1)
}
fatal(err)
}