0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-30 22:34:13 -05:00

Fix scrub command crash

Signed-off-by: Alexei Dodon <adodon@cisco.com>
This commit is contained in:
Alexei Dodon 2022-01-22 16:05:14 +02:00 committed by Ramkumar Chinchani
parent c9a81baa10
commit d259ba6e4f

View file

@ -15,6 +15,7 @@ import (
"zotregistry.io/zot/errors"
"zotregistry.io/zot/pkg/api"
"zotregistry.io/zot/pkg/api/config"
"zotregistry.io/zot/pkg/extensions/monitoring"
"zotregistry.io/zot/pkg/storage"
)
@ -121,6 +122,7 @@ func newScrubCmd(conf *config.Config) *cobra.Command {
} else {
// server is down
ctlr := api.NewController(conf)
ctlr.Metrics = monitoring.NewMetricsServer(false, ctlr.Log)
if err := ctlr.InitImageStore(); err != nil {
panic(err)