mirror of
https://github.com/beego/bee.git
synced 2024-11-22 20:20:55 +00:00
Merge pull request #158 from kyle-wang/develop
Fix bug that execute the cmd not in application catalog
This commit is contained in:
commit
e1b4f74cd7
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user