From 51a71930c2e10dae4c0eee76f434f9f6fca6fba2 Mon Sep 17 00:00:00 2001 From: george Date: Wed, 15 Aug 2018 10:22:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=AC=E5=9C=B0=E6=94=AF?= =?UTF-8?q?=E6=8C=81widows=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jobs/job.go | 4 ++-- views/tasklog/detail.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jobs/job.go b/jobs/job.go index d161cdc..4ab6665 100644 --- a/jobs/job.go +++ b/jobs/job.go @@ -76,9 +76,9 @@ func NewCommandJob(id int, name string, command string) *Job { //cmd := exec.Command("/bin/bash", "-c", command) var cmd *exec.Cmd if runtime.GOOS == "windows" { - cmd = exec.Command("sh", "-c", command) - } else { cmd = exec.Command("CMD", "/C", command) + } else { + cmd = exec.Command("sh", "-c", command) } cmd.Stdout = bufOut cmd.Stderr = bufErr diff --git a/views/tasklog/detail.html b/views/tasklog/detail.html index 14ec727..e2f6e75 100644 --- a/views/tasklog/detail.html +++ b/views/tasklog/detail.html @@ -67,7 +67,7 @@
执行输出
-
{{.taskLog.ouput}}
+
{{.taskLog.output}}