1
0
mirror of https://github.com/beego/bee.git synced 2024-11-23 01:30:55 +00:00

curpath需要做一次EvalSymlinks。

如果传入参数curpath是一个link的目录,gopath一般与curpath有部分是相同的根目录,但函数内部只对gopath进行EvalSymlinks,这样就导致两个目录完全不相同,最终会导致haspath为false,出错退出函数。
This commit is contained in:
LiuQiQuan 2016-07-05 13:55:51 +08:00 committed by GitHub
parent bde0eeef5f
commit d41c41a137

View File

@ -643,7 +643,8 @@ func checkEnv(appname string) (apppath, packpath string, err error) {
if err != nil {
return
}
curpath, _ = path.EvalSymlinks(curpath)
gopath := os.Getenv("GOPATH")
Debugf("gopath:%s", gopath)
if gopath == "" {