diff options
Diffstat (limited to 'cmd/serve.go')
-rw-r--r-- | cmd/serve.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/serve.go b/cmd/serve.go index 2578b26dfd..3ac29d7ec3 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -51,7 +51,9 @@ func setup(logPath string) { if setting.UseSQLite3 || setting.UseTiDB { workDir, _ := setting.WorkDir() - os.Chdir(workDir) + if err := os.Chdir(workDir); err != nil { + log.GitLogger.Fatal(4, "Fail to change directory %s: %v", workDir, err) + } } models.SetEngine() |