mirror of
https://gitee.com/gokins/gokins.git
synced 2024-11-29 17:57:50 +08:00
fix: bug
This commit is contained in:
parent
781b3b0231
commit
8cfe337c53
12
mgr/run.go
12
mgr/run.go
@ -1,6 +1,7 @@
|
||||
package mgr
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
@ -10,7 +11,6 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"bytes"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
@ -102,7 +102,7 @@ func (c *RunTask) run() {
|
||||
}
|
||||
|
||||
func writeEnvs(buf *bytes.Buffer, line string) {
|
||||
if strings.Index(line,"=")<=0{
|
||||
if strings.Index(line, "=") <= 0 {
|
||||
return
|
||||
}
|
||||
vs := strings.ReplaceAll(line, "\t", ``)
|
||||
@ -161,10 +161,10 @@ func (c *RunTask) runs(pgn *model.TPlugin) (rns *model.TPluginRun, rterr error)
|
||||
writeEnvs(buf, s)
|
||||
}
|
||||
}
|
||||
writeEnvs(buf,"WORKDIR="+c.Md.Wrkdir)
|
||||
buf.WriteString("\n");
|
||||
buf.WriteString(pgn.Cont);
|
||||
buf.WriteString("\n");
|
||||
writeEnvs(buf, "WORKDIR="+c.Md.Wrkdir)
|
||||
buf.WriteString("\n")
|
||||
buf.WriteString(pgn.Cont)
|
||||
buf.WriteString("\n")
|
||||
|
||||
name := "sh"
|
||||
par0 := "-c"
|
||||
|
Loading…
Reference in New Issue
Block a user