From ae25ac5c957c5322d0190e3130de6a8fc7d3c1ff Mon Sep 17 00:00:00 2001 From: n00b-bot Date: Mon, 27 Nov 2023 15:28:29 +0700 Subject: [PATCH 1/2] Fix missing return --- core/step.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/step.go b/core/step.go index 6f22adc..04de397 100644 --- a/core/step.go +++ b/core/step.go @@ -153,7 +153,10 @@ func (r *Runner) RunCommands(commands []string, std string) string { var out string if std != "" { if strings.Contains(std, "/dev/pts") { - err = utils.RunOSCommandStream(command, std) + if err := utils.RunOSCommandStream(command, std); err != nil { + utils.DebugF("error running command: %v -- %v", command, err) + } + return } out, err = utils.RunOSCommand(command) } else { From bf57aac4b841fe7cf8c84f475a8d0483fe4b300a Mon Sep 17 00:00:00 2001 From: n00b-bot Date: Thu, 30 Nov 2023 16:17:21 +0700 Subject: [PATCH 2/2] Update something --- utils/helper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/helper.go b/utils/helper.go index 98b1c6d..c1f34c2 100644 --- a/utils/helper.go +++ b/utils/helper.go @@ -557,9 +557,9 @@ func RunOSCommandStream(cmd, std string) error { "-c", cmd, } - fmt.Println(std) file, _ := os.OpenFile(std, os.O_WRONLY, os.ModeAppend) realCmd := exec.Command(command[0], command[1:]...) + // realCmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true} // output command output to std too realCmd.Stdout = file