Commit 3031bdd1 authored by coseyo's avatar coseyo

fix test error

parent 4c1cfc13
......@@ -185,18 +185,17 @@ func ParseConfig() (err error) {
workPath, _ := os.Getwd()
workPath, _ = filepath.Abs(workPath)
if workPath != AppPath {
os.Chdir(AppPath)
}
if AppConfigPath == "" {
// initialize default configurations
AppConfigPath = filepath.Join(AppPath, "conf", "app.conf")
if !utils.FileExists(AppConfigPath) {
if utils.FileExists(AppConfigPath) && workPath != AppPath {
os.Chdir(AppPath)
} else {
AppConfig = &beegoAppConfig{config.NewFakeConfig()}
return
}
}
AppConfig, err = newAppConfig(AppConfigProvider, AppConfigPath)
if err != nil {
return err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment