2022-10-04 12:27:40 +02:00
|
|
|
package commands
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/urfave/cli"
|
|
|
|
|
|
|
|
"github.com/photoprism/photoprism/internal/config"
|
2022-10-15 21:54:11 +02:00
|
|
|
"github.com/photoprism/photoprism/internal/get"
|
2022-10-04 12:27:40 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
// InitConfig initializes the command config.
|
|
|
|
var InitConfig = func(ctx *cli.Context) (*config.Config, error) {
|
|
|
|
c := config.NewConfig(ctx)
|
2022-10-15 21:54:11 +02:00
|
|
|
get.SetConfig(c)
|
2022-10-04 12:27:40 +02:00
|
|
|
return c, c.Init()
|
|
|
|
}
|