1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 19:10:54 +00:00

fix test error again

This commit is contained in:
coseyo 2016-01-24 00:47:37 +08:00
parent 3031bdd176
commit 09d3d89c6f

View File

@ -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