mirror of
https://github.com/beego/bee.git
synced 2024-11-25 09:50:55 +00:00
Bug fixed
This commit is contained in:
parent
efac8a0b65
commit
3d3feda34c
11
run.go
11
run.go
@ -19,6 +19,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
path "path/filepath"
|
path "path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/Unknwon/com"
|
"github.com/Unknwon/com"
|
||||||
)
|
)
|
||||||
@ -104,7 +105,15 @@ func runApp(cmd *Command, args []string) {
|
|||||||
path.Join(crupath, "./")) // Current path.
|
path.Join(crupath, "./")) // Current path.
|
||||||
// Because monitor files has some issues, we watch current directory
|
// Because monitor files has some issues, we watch current directory
|
||||||
// and ignore non-go files.
|
// and ignore non-go files.
|
||||||
paths = append(paths, conf.DirStruct.Others...)
|
gps := com.GetGOPATHs()
|
||||||
|
if len(gps) == 0 {
|
||||||
|
com.ColorLog("[ERRO] Fail to start[ %s ]\n", "$GOPATH is not set or empty")
|
||||||
|
os.Exit(2)
|
||||||
|
}
|
||||||
|
gopath := gps[0]
|
||||||
|
for _, p := range conf.DirStruct.Others {
|
||||||
|
paths = append(paths, strings.Replace(p, "$GOPATH", gopath, -1))
|
||||||
|
}
|
||||||
|
|
||||||
NewWatcher(paths)
|
NewWatcher(paths)
|
||||||
Autobuild()
|
Autobuild()
|
||||||
|
Loading…
Reference in New Issue
Block a user