Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion models/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func getEngine() (*xorm.Engine, error) {
}

// NewTestEngine sets a new test xorm.Engine
func NewTestEngine(x *xorm.Engine) (err error) {
func NewTestEngine() (err error) {
x, err = getEngine()
if err != nil {
return fmt.Errorf("Connect to database: %v", err)
Expand Down
4 changes: 1 addition & 3 deletions routers/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (

"github.com/unknwon/com"
"gopkg.in/ini.v1"
"xorm.io/xorm"
)

const (
Expand Down Expand Up @@ -161,8 +160,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
}

// Set test engine.
var x *xorm.Engine
if err = models.NewTestEngine(x); err != nil {
if err = models.NewTestEngine(); err != nil {
if strings.Contains(err.Error(), `Unknown database type: sqlite3`) {
ctx.Data["Err_DbType"] = true
ctx.RenderWithErr(ctx.Tr("install.sqlite3_not_available", "https://docs.gitea.io/en-us/install-from-binary/"), tplInstall, &form)
Expand Down