From 042cac5fedeec8af53080b9666fe043072f3a6be Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Wed, 1 Dec 2021 15:50:01 +0800 Subject: Improve install code to avoid low-level mistakes. (#17779) * Improve install code to avoid low-level mistakes. If a user tries to do a re-install in a Gitea database, they gets a warning and double check. When Gitea runs, it never create empty app.ini automatically. Also some small (related) refactoring: * Refactor db.InitEngine related logic make it more clean (especially for the install code) * Move some i18n strings out from setting.go to make the setting.go can be easily maintained. * Show errors in CLI code if an incorrect app.ini is used. * APP_DATA_PATH is created when installing, and checked when starting (no empty directory is created any more). --- cmd/dump_repo.go | 1 - 1 file changed, 1 deletion(-) (limited to 'cmd/dump_repo.go') diff --git a/cmd/dump_repo.go b/cmd/dump_repo.go index 31f4574c2d..1a9344dbe1 100644 --- a/cmd/dump_repo.go +++ b/cmd/dump_repo.go @@ -88,7 +88,6 @@ func runDumpRepository(ctx *cli.Context) error { log.Info("Custom path: %s", setting.CustomPath) log.Info("Log path: %s", setting.LogRootPath) log.Info("Configuration file: %s", setting.CustomConf) - setting.InitDBConfig() var ( serviceType structs.GitServiceType -- cgit v1.2.3