mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 08:00:57 +00:00
beego: hot fix for TestBeegoInit can't parsefile
This commit is contained in:
parent
5c06cd090c
commit
7f394feab5
5
beego.go
5
beego.go
@ -238,6 +238,11 @@ func initBeforeHttpRun() {
|
|||||||
func TestBeegoInit(apppath string) {
|
func TestBeegoInit(apppath string) {
|
||||||
AppPath = apppath
|
AppPath = apppath
|
||||||
AppConfigPath = filepath.Join(AppPath, "conf", "app.conf")
|
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)
|
os.Chdir(AppPath)
|
||||||
initBeforeHttpRun()
|
initBeforeHttpRun()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user