Skip to content
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

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 8 additions & 5 deletions routers/init.go
Expand Up @@ -126,6 +126,7 @@ func GlobalInit(ctx context.Context) {
if !setting.InstallLock {
log.Fatal("Gitea is not installed")
}

if err := git.Init(ctx); err != nil {
log.Fatal("Git module init failed: %v", err)
}
Expand All @@ -134,6 +135,7 @@ 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
translation.InitLocales()
Expand All @@ -143,6 +145,12 @@ func GlobalInit(ctx context.Context) {
highlight.NewContext()
external.RegisterParsers()
markup.Init()

if setting.EnableSQLite3 {
log.Info("SQLite3 Supported")
} else if setting.Database.UseSQLite3 {
log.Fatal("SQLite3 is set in settings but NOT Supported")
}
if err := initDBEngine(ctx); err == nil {
log.Info("ORM engine initialization successful!")
} else {
Expand Down Expand Up @@ -175,11 +183,6 @@ func GlobalInit(ctx context.Context) {
}
eventsource.GetManager().Init()

if setting.EnableSQLite3 {
log.Info("SQLite3 Supported")
}
checkRunMode()

if setting.SSH.StartBuiltinServer {
ssh.Listen(setting.SSH.ListenHost, setting.SSH.ListenPort, setting.SSH.ServerCiphers, setting.SSH.ServerKeyExchanges, setting.SSH.ServerMACs)
log.Info("SSH server started on %s:%d. Cipher list (%v), key exchange algorithms (%v), MACs (%v)", setting.SSH.ListenHost, setting.SSH.ListenPort, setting.SSH.ServerCiphers, setting.SSH.ServerKeyExchanges, setting.SSH.ServerMACs)
Expand Down