From 7e85cba3e500c8548e7e21ad61bbb4c092c16503 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 3 Mar 2021 22:54:32 +0100 Subject: [PATCH] Print usefull error if SQLite is used in settings but not supported (#14476) (#14874) * move log output to points where they are relefant * check explicit of sqlite3 in settings --- routers/init.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/routers/init.go b/routers/init.go index 608db79cb0..8265c55852 100644 --- a/routers/init.go +++ b/routers/init.go @@ -133,12 +133,19 @@ 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 InitLocales() NewServices() + if setting.EnableSQLite3 { + log.Info("SQLite3 Supported") + } else if setting.Database.UseSQLite3 { + log.Fatal("SQLite3 is set in settings but NOT Supported") + } + if setting.InstallLock { highlight.NewContext() external.RegisterParsers() @@ -172,10 +179,6 @@ func GlobalInit(ctx context.Context) { } eventsource.GetManager().Init() } - if setting.EnableSQLite3 { - log.Info("SQLite3 Supported") - } - checkRunMode() if err := repo_migrations.Init(); err != nil { log.Fatal("Failed to initialize repository migrations: %v", err)