diff options
author | 6543 <6543@obermui.de> | 2021-03-03 22:54:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-03 21:54:32 +0000 |
commit | 7e85cba3e500c8548e7e21ad61bbb4c092c16503 (patch) | |
tree | 26dcc5cc6cd6feb620ab59fefc1e076229172992 | |
parent | 26628aa1d1bdacdbbca97d7dd2dca11972cde1c7 (diff) | |
download | gitea-7e85cba3e500c8548e7e21ad61bbb4c092c16503.tar.gz gitea-7e85cba3e500c8548e7e21ad61bbb4c092c16503.zip |
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
-rw-r--r-- | routers/init.go | 11 |
1 files 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) |