mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 01:30:55 +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) {
|
||||
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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user