Update watch.go

在window编译linux后,bee run 执行的appname为linux的可执行文件
This commit is contained in:
lixz 2017-12-29 17:09:02 +08:00 committed by GitHub
parent e90da8f77b
commit 5ba8b15e3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -139,9 +139,9 @@ func AutoBuild(files []string, isgenerate bool) {
} }
beeLogger.Log.Success("Docs generated!") beeLogger.Log.Success("Docs generated!")
} }
appName := appname
if err == nil { if err == nil {
appName := appname
if runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
appName += ".exe" appName += ".exe"
} }
@ -165,7 +165,7 @@ func AutoBuild(files []string, isgenerate bool) {
} }
beeLogger.Log.Success("Built Successfully!") beeLogger.Log.Success("Built Successfully!")
Restart(appname) Restart(appName)
} }
// Kill kills the running command process // Kill kills the running command process