Skip to content

Commit

Permalink
Print usefull error if SQLite is used in settings but not supported (#…
Browse files Browse the repository at this point in the history
…14476) (#14874)

* move log output to points where they are relefant

* check explicit of sqlite3 in settings
  • Loading branch information
6543 committed Mar 3, 2021
1 parent 26628aa commit 7e85cba
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions routers/init.go
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 7e85cba

Please sign in to comment.