1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-15 15:07:20 +00:00

gitea dump: include version & Check InstallLock (#12760) (#12762)

* gitea dump: include version

* Check InstallLock
This commit is contained in:
6543
2020-09-08 02:44:45 +02:00
committed by GitHub
parent dc71d00393
commit 7a25441abe
3 changed files with 21 additions and 0 deletions

View File

@ -66,6 +66,10 @@ func fatal(format string, args ...interface{}) {
func runDump(ctx *cli.Context) error {
setting.NewContext()
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()