1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 01:20:55 +00:00

beego: hot fix for TestBeegoInit can't parsefile

This commit is contained in:
astaxie 2014-04-04 10:04:22 +08:00
parent 5c06cd090c
commit 7f394feab5

View File

@ -238,6 +238,11 @@ func initBeforeHttpRun() {
func TestBeegoInit(apppath string) {
AppPath = apppath
AppConfigPath = filepath.Join(AppPath, "conf", "app.conf")
err := ParseConfig()
if err != nil && !os.IsNotExist(err) {
// for init if doesn't have app.conf will not panic
Info(err)
}
os.Chdir(AppPath)
initBeforeHttpRun()
}