| ... | ... |
@@ -42,6 +42,9 @@ func Untar(archive io.Reader, path string) error {
|
| 42 | 42 |
return nil |
| 43 | 43 |
} |
| 44 | 44 |
|
| 45 |
+// CmdStream executes a command, and returns its stdout as a stream. |
|
| 46 |
+// If the command fails to run or doesn't complete successfully, an error |
|
| 47 |
+// will be returned, including anything written on stderr. |
|
| 45 | 48 |
func CmdStream(cmd *exec.Cmd) (io.Reader, error) {
|
| 46 | 49 |
stdout, err := cmd.StdoutPipe() |
| 47 | 50 |
if err != nil {
|