summaryrefslogtreecommitdiffstats
path: root/cmd/serve.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/serve.go')
-rw-r--r--cmd/serve.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/serve.go b/cmd/serve.go
index f7b0d2045d..47406dd009 100644
--- a/cmd/serve.go
+++ b/cmd/serve.go
@@ -16,7 +16,7 @@ import (
qlog "github.com/qiniu/log"
"github.com/gogits/gogs/models"
- "github.com/gogits/gogs/modules/base"
+ "github.com/gogits/gogs/modules/setting"
)
var CmdServ = cli.Command{
@@ -41,14 +41,14 @@ func newLogger(logPath string) {
}
func setup(logPath string) {
- execDir, _ := base.ExecDir()
- newLogger(path.Join(execDir, logPath))
+ workDir, _ := setting.WorkDir()
+ newLogger(path.Join(workDir, logPath))
- base.NewConfigContext()
+ setting.NewConfigContext()
models.LoadModelsConfig()
if models.UseSQLite3 {
- os.Chdir(execDir)
+ os.Chdir(workDir)
}
models.SetEngine()
@@ -182,7 +182,7 @@ func runServ(k *cli.Context) {
models.SetRepoEnvs(user.Id, user.Name, repoName, repoUserName)
gitcmd := exec.Command(verb, repoPath)
- gitcmd.Dir = base.RepoRootPath
+ gitcmd.Dir = setting.RepoRootPath
gitcmd.Stdout = os.Stdout
gitcmd.Stdin = os.Stdin
gitcmd.Stderr = os.Stderr