aboutsummaryrefslogtreecommitdiffstats
path: root/routers/init.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-01-27 04:57:18 +0100
committerGitHub <noreply@github.com>2021-01-27 04:57:18 +0100
commitb2c20b68a08e23bc952402a553d59a4613188bd0 (patch)
tree639b0033afdbbb3974981a1fe34b945911be5ed2 /routers/init.go
parent5845c87b314d05573f68d0c010f3d5bd2595dcdb (diff)
downloadgitea-b2c20b68a08e23bc952402a553d59a4613188bd0.tar.gz
gitea-b2c20b68a08e23bc952402a553d59a4613188bd0.zip
Print usefull error if SQLite is used in settings but not supported (#14476)
* move log output to points where they are relefant * check explicit of sqlite3 in settings
Diffstat (limited to 'routers/init.go')
-rw-r--r--routers/init.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/routers/init.go b/routers/init.go
index 9d13bc9ed5..f5dbfc87d2 100644
--- a/routers/init.go
+++ b/routers/init.go
@@ -126,6 +126,7 @@ func GlobalInit(ctx context.Context) {
if !setting.InstallLock {
log.Fatal("Gitea is not installed")
}
+
if err := git.Init(ctx); err != nil {
log.Fatal("Git module init failed: %v", err)
}
@@ -134,6 +135,7 @@ func GlobalInit(ctx context.Context) {
log.Trace("AppWorkPath: %s", setting.AppWorkPath)
log.Trace("Custom path: %s", setting.CustomPath)
log.Trace("Log path: %s", setting.LogRootPath)
+ checkRunMode()
// Setup i18n
translation.InitLocales()
@@ -143,6 +145,12 @@ func GlobalInit(ctx context.Context) {
highlight.NewContext()
external.RegisterParsers()
markup.Init()
+
+ if setting.EnableSQLite3 {
+ log.Info("SQLite3 Supported")
+ } else if setting.Database.UseSQLite3 {
+ log.Fatal("SQLite3 is set in settings but NOT Supported")
+ }
if err := initDBEngine(ctx); err == nil {
log.Info("ORM engine initialization successful!")
} else {
@@ -175,11 +183,6 @@ func GlobalInit(ctx context.Context) {
}
eventsource.GetManager().Init()
- if setting.EnableSQLite3 {
- log.Info("SQLite3 Supported")
- }
- checkRunMode()
-
if setting.SSH.StartBuiltinServer {
ssh.Listen(setting.SSH.ListenHost, setting.SSH.ListenPort, setting.SSH.ServerCiphers, setting.SSH.ServerKeyExchanges, setting.SSH.ServerMACs)
log.Info("SSH server started on %s:%d. Cipher list (%v), key exchange algorithms (%v), MACs (%v)", setting.SSH.ListenHost, setting.SSH.ListenPort, setting.SSH.ServerCiphers, setting.SSH.ServerKeyExchanges, setting.SSH.ServerMACs)