Merge branch 'develop' of https://github.com/beego/bee into develop

This commit is contained in:
astaxie 2016-01-07 18:37:46 +08:00
commit 5eb49ca0a6
1 changed files with 6 additions and 0 deletions

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
}