Skip to content

Commit 87b81df

Browse files
committed
Check InstallLock (close #12759)
1 parent 230f328 commit 87b81df

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/dump.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ func runDump(ctx *cli.Context) error {
186186
if _, err := setting.Cfg.Section("log.console").NewKey("STDERR", "true"); err != nil {
187187
fatal("Setting console logger to stderr failed: %v", err)
188188
}
189+
if !setting.InstallLock {
190+
log.Error("Is '%s' really the right config path?\n", setting.CustomConf)
191+
return fmt.Errorf("gitea is not initalized")
192+
}
189193
setting.NewServices() // cannot access session settings otherwise
190194

191195
err := models.SetEngine()

0 commit comments

Comments
 (0)