gitea dump: include version & Check InstallLock (#12760)
* gitea dump: include version * Check InstallLock (close #12759) * fix test * fix lint
This commit is contained in:
parent
226aef7e0f
commit
cfd8e8a489
3 changed files with 21 additions and 0 deletions
|
@ -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 initialized")
|
||||
}
|
||||
setting.NewServices() // cannot access session settings otherwise
|
||||
|
||||
err := models.SetEngine()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue