mirror of
https://github.com/astaxie/beego.git
synced 2024-11-04 21:40:56 +00:00
fix test error again
This commit is contained in:
parent
3031bdd176
commit
09d3d89c6f
@ -188,14 +188,16 @@ func ParseConfig() (err error) {
|
|||||||
if AppConfigPath == "" {
|
if AppConfigPath == "" {
|
||||||
// initialize default configurations
|
// initialize default configurations
|
||||||
AppConfigPath = filepath.Join(AppPath, "conf", "app.conf")
|
AppConfigPath = filepath.Join(AppPath, "conf", "app.conf")
|
||||||
if utils.FileExists(AppConfigPath) && workPath != AppPath {
|
if !utils.FileExists(AppConfigPath) {
|
||||||
os.Chdir(AppPath)
|
|
||||||
} else {
|
|
||||||
AppConfig = &beegoAppConfig{config.NewFakeConfig()}
|
AppConfig = &beegoAppConfig{config.NewFakeConfig()}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if workPath != AppPath {
|
||||||
|
os.Chdir(AppPath)
|
||||||
|
}
|
||||||
|
|
||||||
AppConfig, err = newAppConfig(AppConfigProvider, AppConfigPath)
|
AppConfig, err = newAppConfig(AppConfigProvider, AppConfigPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user