mirror of
https://github.com/j3ssie/osmedeus.git
synced 2026-09-28 04:24:59 +02:00
Merge pull request #270 from n00b-bot/main
Fix missing return in RunOSCommandStream
This commit is contained in:
+4
-1
@@ -156,7 +156,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 {
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user