summaryrefslogtreecommitdiffstats
path: root/cmd/serve.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-25 20:11:25 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-25 20:11:25 -0400
commit688ec6ecbdf0e1c450aa93fdc4d760c4ae63a73f (patch)
tree8adb59c369d1fe1bd41ae7be38785dc613a29a91 /cmd/serve.go
parent87854c95a90cf1bebe1bffb833389471fb35f234 (diff)
downloadgitea-688ec6ecbdf0e1c450aa93fdc4d760c4ae63a73f.tar.gz
gitea-688ec6ecbdf0e1c450aa93fdc4d760c4ae63a73f.zip
Fixed #209
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