From bceabc7d6909754d7ed70e754ca07259fbcf827d Mon Sep 17 00:00:00 2001 From: songzhibin97 <718428482@qq.com> Date: Tue, 17 Nov 2020 21:20:18 +0800 Subject: [PATCH] f --- server/utils/cmd_Task.go | 10 +++++----- server/utils/cmd_monitor.go | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/server/utils/cmd_Task.go b/server/utils/cmd_Task.go index a1beeaa9..493be02c 100644 --- a/server/utils/cmd_Task.go +++ b/server/utils/cmd_Task.go @@ -96,9 +96,9 @@ func (t *T) DefaultF(ch chan struct{}) error { switch runtime.GOOS { case "windows": - buildCmd = exec.Command("go", "build", "-o", "gva.exe", "main.go") + buildCmd = exec.Command("go", "build", "-o", "server.exe", "main.go") default: - buildCmd = exec.Command("go", "build", "-o", "gva", "main.go") + buildCmd = exec.Command("go", "build", "-o", "server", "main.go") } //cmd = exec.Command("go", "run", "main.go") err = buildCmd.Run() @@ -109,9 +109,9 @@ func (t *T) DefaultF(ch chan struct{}) error { // 执行 switch runtime.GOOS { case "windows": - cmd = exec.Command("gva.exe") + cmd = exec.Command("server.exe") default: - cmd = exec.Command("./gva") + cmd = exec.Command("./server") } // 开始执行任务 @@ -155,7 +155,7 @@ func (t *T) echo(cmd *exec.Cmd, ctx context.Context) error { fmt.Printf("%s\n", string(stdoutBuf.Bytes())) select { case <-ctx.Done(): - _ = os.Stdout.Close() + //_ = os.Stdout.Close() return default: } diff --git a/server/utils/cmd_monitor.go b/server/utils/cmd_monitor.go index d95e35b7..a3ca8bf5 100644 --- a/server/utils/cmd_monitor.go +++ b/server/utils/cmd_monitor.go @@ -125,7 +125,6 @@ func (w *Watch) watchFile(path string) error { // chickPower: 判断是否在可控范围内 func chickPower(name string) bool { name = filepath.Ext(name) - fmt.Println(name) return name == ".go" || name == ".yaml" }