Output returns cmd.Output(), potentially timing out in the process.
(cmd *exec.Cmd)
| 363 | |
| 364 | // Output returns cmd.Output(), potentially timing out in the process. |
| 365 | func (c *Control) Output(cmd *exec.Cmd) ([]byte, error) { |
| 366 | var stdout bytes.Buffer |
| 367 | cmd.Stdout = &stdout |
| 368 | err := c.FinishRunning(cmd) |
| 369 | return stdout.Bytes(), err |
| 370 | } |
| 371 | |
| 372 | // NoOutput ignores all output from the command, potentially timing out in the process. |
| 373 | func (c *Control) NoOutput(cmd *exec.Cmd) error { |