mirror of
https://github.com/go-acme/lego.git
synced 2024-12-23 01:07:23 +02:00
24 lines
519 B
Go
24 lines
519 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/go-acme/lego/v4/log"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
func Before(ctx *cli.Context) error {
|
|
if ctx.String(flgPath) == "" {
|
|
log.Fatalf("Could not determine current working directory. Please pass --%s.", flgPath)
|
|
}
|
|
|
|
err := createNonExistingFolder(ctx.String(flgPath))
|
|
if err != nil {
|
|
log.Fatalf("Could not check/create path: %v", err)
|
|
}
|
|
|
|
if ctx.String(flgServer) == "" {
|
|
log.Fatalf("Could not determine current working server. Please pass --%s.", flgServer)
|
|
}
|
|
|
|
return nil
|
|
}
|