forked from TrueCloudLab/certificates
Move to commands/app.go
This commit is contained in:
parent
4b7fa2524d
commit
50b4011b03
2 changed files with 3 additions and 3 deletions
|
@ -213,9 +213,6 @@ func (c *AuthConfig) Validate(audiences provisioner.Audiences) error {
|
||||||
func LoadConfiguration(filename string) (*Config, error) {
|
func LoadConfiguration(filename string) (*Config, error) {
|
||||||
f, err := os.Open(filename)
|
f, err := os.Open(filename)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
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\n")
|
|
||||||
return nil, errors.Wrapf(err, "error opening %s", filename)
|
return nil, errors.Wrapf(err, "error opening %s", filename)
|
||||||
}
|
}
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
|
|
|
@ -141,6 +141,9 @@ func appAction(ctx *cli.Context) error {
|
||||||
|
|
||||||
cfg, err := config.LoadConfiguration(configFile)
|
cfg, err := config.LoadConfiguration(configFile)
|
||||||
if err != nil && token == "" {
|
if err != nil && token == "" {
|
||||||
|
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\n")
|
||||||
fatal(err)
|
fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue