mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-15 18:56:59 +00:00
Fixed #209
This commit is contained in:
parent
87854c95a9
commit
688ec6ecbd
37 changed files with 693 additions and 482 deletions
10
cmd/fix.go
10
cmd/fix.go
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
var CmdFix = cli.Command{
|
||||
|
@ -22,14 +22,14 @@ var CmdFix = cli.Command{
|
|||
}
|
||||
|
||||
func runFix(k *cli.Context) {
|
||||
execDir, _ := base.ExecDir()
|
||||
newLogger(execDir)
|
||||
workDir, _ := setting.WorkDir()
|
||||
newLogger(workDir)
|
||||
|
||||
base.NewConfigContext()
|
||||
setting.NewConfigContext()
|
||||
models.LoadModelsConfig()
|
||||
|
||||
if models.UseSQLite3 {
|
||||
os.Chdir(execDir)
|
||||
os.Chdir(workDir)
|
||||
}
|
||||
|
||||
models.SetEngine()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue