From 5ba8b15e3aa6de7ba36e527a8fb7146e08533c36 Mon Sep 17 00:00:00 2001 From: lixz <361293862@qq.com> Date: Fri, 29 Dec 2017 17:09:02 +0800 Subject: [PATCH] Update watch.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在window编译linux后,bee run 执行的appname为linux的可执行文件 --- cmd/commands/run/watch.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/commands/run/watch.go b/cmd/commands/run/watch.go index 825b7b9..1b463ee 100644 --- a/cmd/commands/run/watch.go +++ b/cmd/commands/run/watch.go @@ -139,9 +139,9 @@ func AutoBuild(files []string, isgenerate bool) { } beeLogger.Log.Success("Docs generated!") } - + appName := appname if err == nil { - appName := appname + if runtime.GOOS == "windows" { appName += ".exe" } @@ -165,7 +165,7 @@ func AutoBuild(files []string, isgenerate bool) { } beeLogger.Log.Success("Built Successfully!") - Restart(appname) + Restart(appName) } // Kill kills the running command process