修改本地支持widows命令
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
|
||||
<legend>执行输出</legend>
|
||||
</fieldset>
|
||||
<pre class="layui-code">{{.taskLog.ouput}}</pre>
|
||||
<pre class="layui-code">{{.taskLog.output}}</pre>
|
||||
</div>
|
||||
|
||||
<div class="layui-layout layui-layout-admin" style="padding-left: 40px;margin-top: 20px;padding-right: 10px;">
|
||||
|
||||
Reference in New Issue
Block a user