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
This commit is contained in:
6543 2021-03-03 22:54:32 +01:00 committed by GitHub
parent 26628aa1d1
commit 7e85cba3e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -133,12 +133,19 @@ func GlobalInit(ctx context.Context) {
log.Trace("AppWorkPath: %s", setting.AppWorkPath) log.Trace("AppWorkPath: %s", setting.AppWorkPath)
log.Trace("Custom path: %s", setting.CustomPath) log.Trace("Custom path: %s", setting.CustomPath)
log.Trace("Log path: %s", setting.LogRootPath) log.Trace("Log path: %s", setting.LogRootPath)
checkRunMode()
// Setup i18n // Setup i18n
InitLocales() InitLocales()
NewServices() 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 { if setting.InstallLock {
highlight.NewContext() highlight.NewContext()
external.RegisterParsers() external.RegisterParsers()
@ -172,10 +179,6 @@ func GlobalInit(ctx context.Context) {
} }
eventsource.GetManager().Init() eventsource.GetManager().Init()
} }
if setting.EnableSQLite3 {
log.Info("SQLite3 Supported")
}
checkRunMode()
if err := repo_migrations.Init(); err != nil { if err := repo_migrations.Init(); err != nil {
log.Fatal("Failed to initialize repository migrations: %v", err) log.Fatal("Failed to initialize repository migrations: %v", err)