mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 22:20:50 +00:00
beego: hot fix for TestBeegoInit can't parsefile
This commit is contained in:
parent
f222f5b238
commit
8cbea70e07
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