Once an exec.Cmd has been Run (e.g. through .Run, .Output or .CombinedOutput) calling one of these run methods again will result in an error.
- This fact isn't documented.
- The resulting error messages don't clearly identify what caused the problem.
- This behaviour probably isn't necessary; for many commands it makes perfectly good sense to run them more than once.
I'm not talking about parallel execution here, this is running, checking the output, then running again.
Example error message from calling CombinedOutput more than once:
"exec: Stdout already set."
http://play.golang.org/p/Aaj3Gbva_S