1
0
mirror of https://github.com/beego/bee.git synced 2024-06-03 02:23:27 +00:00
This commit is contained in:
kyle 2016-01-07 03:44:26 +00:00
commit d047029c79

View File

@ -985,6 +985,12 @@ func getPackagePath(curpath string) (packpath string) {
ColorLog("[ERRO] Can't generate application code outside of GOPATH '%s'\n", gopath)
os.Exit(2)
}
if curpath == appsrcpath {
ColorLog("[ERRO] Can't generate application code outside of application PATH \n")
os.Exit(2)
}
packpath = strings.Join(strings.Split(curpath[len(appsrcpath)+1:], string(filepath.Separator)), "/")
return
}