summaryrefslogtreecommitdiffstats
path: root/cmd/dump.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-09-08 00:27:17 +0200
committerGitHub <noreply@github.com>2020-09-07 23:27:17 +0100
commitcfd8e8a489f7f5e80584bd7190a7cb2120e2fa8b (patch)
treef40b2e1714235edfe74dfb228ec4d08cefff03ae /cmd/dump.go
parent226aef7e0f9addfd254558eb4fd633946551664b (diff)
downloadgitea-cfd8e8a489f7f5e80584bd7190a7cb2120e2fa8b.tar.gz
gitea-cfd8e8a489f7f5e80584bd7190a7cb2120e2fa8b.zip
gitea dump: include version & Check InstallLock (#12760)
* gitea dump: include version * Check InstallLock (close #12759) * fix test * fix lint
Diffstat (limited to 'cmd/dump.go')
-rw-r--r--cmd/dump.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/dump.go b/cmd/dump.go
index c647341221..0e41ecb8c7 100644
--- a/cmd/dump.go
+++ b/cmd/dump.go
@@ -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()