Skip to content

Commit 7122db0

Browse files
authored
Merge pull request #270 from n00b-bot/main
Fix missing return in RunOSCommandStream
2 parents eaadf9a + 845ddbf commit 7122db0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

core/step.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ func (r *Runner) RunCommands(commands []string, std string) string {
156156
var out string
157157
if std != "" {
158158
if strings.Contains(std, "/dev/pts") {
159-
err = utils.RunOSCommandStream(command, std)
159+
if err := utils.RunOSCommandStream(command, std); err != nil {
160+
utils.DebugF("error running command: %v -- %v", command, err)
161+
}
162+
return
160163
}
161164
out, err = utils.RunOSCommand(command)
162165
} else {

utils/helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,9 +557,9 @@ func RunOSCommandStream(cmd, std string) error {
557557
"-c",
558558
cmd,
559559
}
560-
fmt.Println(std)
561560
file, _ := os.OpenFile(std, os.O_WRONLY, os.ModeAppend)
562561
realCmd := exec.Command(command[0], command[1:]...)
562+
// realCmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
563563

564564
// output command output to std too
565565
realCmd.Stdout = file

0 commit comments

Comments
 (0)