Skip to content

Commit

Permalink
Piped IO of script process to gosh.
Browse files Browse the repository at this point in the history
  • Loading branch information
hekonsek committed Oct 18, 2019
1 parent d1fb4ec commit d4d6994
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gosh.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ go 1.12
scriptExec := exec.Command("go", "run", filepath.Base(scriptArg))
scriptExec.Dir = tmpScriptDir
scriptExec.Env = append(os.Environ(), "GO111MODULE=on")
out, err := scriptExec.CombinedOutput()
fmt.Print(string(out))
scriptExec.Stdin = os.Stdin
scriptExec.Stdout = os.Stdout
scriptExec.Stderr = os.Stderr
err = scriptExec.Run()
if err != nil {
panic(err)
}
Expand Down

0 comments on commit d4d6994

Please sign in to comment.