mirror of
https://github.com/beego/bee.git
synced 2024-11-21 18:40:54 +00:00
Merge pull request #15 from wangxian/master
fixed: Support bee start appname && bee start ./appname
This commit is contained in:
commit
7e4fd3f528
5
watch.go
5
watch.go
@ -8,6 +8,7 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -95,6 +96,10 @@ func Restart(appname string) {
|
|||||||
func Start(appname string) {
|
func Start(appname string) {
|
||||||
fmt.Println("start", appname)
|
fmt.Println("start", appname)
|
||||||
|
|
||||||
|
if strings.Index(appname, "./") == -1 {
|
||||||
|
appname = "./" + appname
|
||||||
|
}
|
||||||
|
|
||||||
cmd = exec.Command(appname)
|
cmd = exec.Command(appname)
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
|
Loading…
Reference in New Issue
Block a user