From 09d3d89c6f0444f92c03a382bc2cdade17363af1 Mon Sep 17 00:00:00 2001 From: coseyo Date: Sun, 24 Jan 2016 00:47:37 +0800 Subject: [PATCH] fix test error again --- config.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/config.go b/config.go index ea329596..3ceae12e 100644 --- a/config.go +++ b/config.go @@ -188,14 +188,16 @@ func ParseConfig() (err error) { if AppConfigPath == "" { // initialize default configurations AppConfigPath = filepath.Join(AppPath, "conf", "app.conf") - if utils.FileExists(AppConfigPath) && workPath != AppPath { - os.Chdir(AppPath) - } else { + if !utils.FileExists(AppConfigPath) { AppConfig = &beegoAppConfig{config.NewFakeConfig()} return } } + if workPath != AppPath { + os.Chdir(AppPath) + } + AppConfig, err = newAppConfig(AppConfigProvider, AppConfigPath) if err != nil { return err