mirror of
https://github.com/photoprism/photoprism.git
synced 2025-10-06 17:27:20 +08:00
CLI: Refactor tests and config initialization
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -39,12 +39,12 @@ var ResetCommand = cli.Command{
|
||||
|
||||
// resetAction resets the index and removes sidecar files after confirmation.
|
||||
func resetAction(ctx *cli.Context) error {
|
||||
conf := config.NewConfig(ctx)
|
||||
conf, err := InitConfig(ctx)
|
||||
|
||||
_, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
if err := conf.Init(); err != nil {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user