mirror of
https://github.com/beego/bee.git
synced 2024-11-22 10:10:53 +00:00
tweak: Exit with message instead of a panic
In case no application is found in GOPATH(s), exit with a friendly message instead of a panic. Also removed useless else block in watch.go.
This commit is contained in:
parent
287af20d1a
commit
56568f4d2c
2
run.go
2
run.go
@ -87,7 +87,7 @@ func runApp(cmd *Command, args []string) int {
|
||||
currentGoPath = _gopath
|
||||
appname = path.Base(currpath)
|
||||
} else {
|
||||
panic(fmt.Sprintf("No Beego application '%s' found in your GOPATH", args[0]))
|
||||
exitPrint(fmt.Sprintf("No Beego application '%s' found in your GOPATH", args[0]))
|
||||
}
|
||||
|
||||
ColorLog("[INFO] Using '%s' as 'appname'\n", appname)
|
||||
|
Loading…
Reference in New Issue
Block a user