// ExecAt runs the given Cmd with is working directory set to path.
ExecAt runs the given Cmd with is working directory set to path.
// ExecAt runs the given Cmd with is working directory set to path .
func ExecAt(cmd *exec.Cmd, path string) ([]byte, error) {
	var stdout, stderr bytes.Buffer
	cmd.Stdout = &stdout
	cmd.Stderr = &stderr
	cmd.Dir = path
	err := cmd.Run()
	if err != nil {
		return nil, fmt.Errorf("couldn't run cmd %s: %v: %s", cmd.String(), err, stderr.String())
	}
	return stdout.Bytes(), nil
}
func ExecAt ( cmd * exec . Cmd , path string ) ( [ ] byte , error ) { var stdout , stderr bytes . Buffer cmd . Stdout = & stdout cmd . Stderr = & stderr cmd . Dir = path err := cmd . Run ( ) if err != nil { return nil , fmt . Errorf ( " " , cmd . String ( ) , err , stderr . String ( ) ) } return stdout . Bytes ( ) , nil }
ExecAt runs the given Cmd with is working directory set to path.
ExecAt runs the given Cmd with is working directory set to path .