Skip to content

Commit

Permalink
Check InstallLock (close go-gitea#12759)
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 committed Sep 7, 2020
1 parent 230f328 commit 87b81df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ func runDump(ctx *cli.Context) error {
if _, err := setting.Cfg.Section("log.console").NewKey("STDERR", "true"); err != nil {
fatal("Setting console logger to stderr failed: %v", err)
}
if !setting.InstallLock {
log.Error("Is '%s' really the right config path?\n", setting.CustomConf)
return fmt.Errorf("gitea is not initalized")
}
setting.NewServices() // cannot access session settings otherwise

err := models.SetEngine()
Expand Down

0 comments on commit 87b81df

Please sign in to comment.