{"action":"created","issue":{"url":"https://api.github.com/repos/constabulary/gb/issues/106","labels_url":"https://api.github.com/repos/constabulary/gb/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/constabulary/gb/issues/106/comments","events_url":"https://api.github.com/repos/constabulary/gb/issues/106/events","html_url":"https://github.com/constabulary/gb/pull/106","id":77550403,"number":106,"title":"runOut: don't lose command output to stdout","user":{"login":"cryptix","id":111202,"avatar_url":"https://avatars.githubusercontent.com/u/111202?v=3","gravatar_id":"","url":"https://api.github.com/users/cryptix","html_url":"https://github.com/cryptix","followers_url":"https://api.github.com/users/cryptix/followers","following_url":"https://api.github.com/users/cryptix/following{/other_user}","gists_url":"https://api.github.com/users/cryptix/gists{/gist_id}","starred_url":"https://api.github.com/users/cryptix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cryptix/subscriptions","organizations_url":"https://api.github.com/users/cryptix/orgs","repos_url":"https://api.github.com/users/cryptix/repos","events_url":"https://api.github.com/users/cryptix/events{/privacy}","received_events_url":"https://api.github.com/users/cryptix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-18T08:05:29Z","updated_at":"2015-05-18T11:05:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/constabulary/gb/pulls/106","html_url":"https://github.com/constabulary/gb/pull/106","diff_url":"https://github.com/constabulary/gb/pull/106.diff","patch_url":"https://github.com/constabulary/gb/pull/106.patch"},"body":"Hi,\r\n\r\nduring my hackish attempt of adding gb to [gin](https://github.com/codegangsta/gin), I noticed that the command output of the `runOut` method is only printed to stdout in the error case.\r\n\r\nThis means that information and output of the compiler and other commands can't be read by tools using gb by themselfs. This PR adds a simple error type that captures the original error, the command args and their output. \r\n\r\nPs: see PR codegangsta/gin#73 if you want to play with it."},"comment":{"url":"https://api.github.com/repos/constabulary/gb/issues/comments/103018483","html_url":"https://github.com/constabulary/gb/pull/106#issuecomment-103018483","issue_url":"https://api.github.com/repos/constabulary/gb/issues/106","id":103018483,"user":{"login":"davecheney","id":7171,"avatar_url":"https://avatars.githubusercontent.com/u/7171?v=3","gravatar_id":"","url":"https://api.github.com/users/davecheney","html_url":"https://github.com/davecheney","followers_url":"https://api.github.com/users/davecheney/followers","following_url":"https://api.github.com/users/davecheney/following{/other_user}","gists_url":"https://api.github.com/users/davecheney/gists{/gist_id}","starred_url":"https://api.github.com/users/davecheney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davecheney/subscriptions","organizations_url":"https://api.github.com/users/davecheney/orgs","repos_url":"https://api.github.com/users/davecheney/repos","events_url":"https://api.github.com/users/davecheney/events{/privacy}","received_events_url":"https://api.github.com/users/davecheney/received_events","type":"User","site_admin":false},"created_at":"2015-05-18T11:05:52Z","updated_at":"2015-05-18T11:05:52Z","body":"Have a look at the changes to this file landing in #103. I can break out\nthe changes to run/runOut if you need.\n\nOn Mon, May 18, 2015 at 7:35 PM, Henry <notifications@github.com> wrote:\n\n> drop the output field,\n>\n> Hrm.. the juicy information (xyz is undefined, can't use foo as bar in\n> assignment..) is in the command output. You only get exit status 1\n> without it.\n>\n> there is no standard way of printing an io.Writer.\n>\n> This was the most confusing thing to me when introducing the output field\n> as string, I didn't notice is was a writer because it was printed like that.\n>\n> Since only run() uses runOut() and it also didn't look at the passed\n> buffers content afterwards, I dropped the run() wrapper and converted the\n> exec.Command to use CominedOutput() instead of Run(). The output is only\n> captured in the error case.\n>\n> How does this look to you?\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/constabulary/gb/pull/106#issuecomment-102994258>.\n>\n"}}