Skip to content

Print usefull error if SQLite is used in settings but not supported (#14476) #14874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions routers/init.go
Original file line number Diff line number Diff line change
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