{"action":"created","issue":{"url":"https://api.github.com/repos/PagerDuty/blender/issues/50","labels_url":"https://api.github.com/repos/PagerDuty/blender/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/PagerDuty/blender/issues/50/comments","events_url":"https://api.github.com/repos/PagerDuty/blender/issues/50/events","html_url":"https://github.com/PagerDuty/blender/pull/50","id":116634454,"number":50,"title":"Idea to fix output when executing a command that fails.","user":{"login":"margueritepd","id":12139316,"avatar_url":"https://avatars.githubusercontent.com/u/12139316?v=3","gravatar_id":"","url":"https://api.github.com/users/margueritepd","html_url":"https://github.com/margueritepd","followers_url":"https://api.github.com/users/margueritepd/followers","following_url":"https://api.github.com/users/margueritepd/following{/other_user}","gists_url":"https://api.github.com/users/margueritepd/gists{/gist_id}","starred_url":"https://api.github.com/users/margueritepd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/margueritepd/subscriptions","organizations_url":"https://api.github.com/users/margueritepd/orgs","repos_url":"https://api.github.com/users/margueritepd/repos","events_url":"https://api.github.com/users/margueritepd/events{/privacy}","received_events_url":"https://api.github.com/users/margueritepd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-12T20:35:22Z","updated_at":"2015-11-12T20:50:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/PagerDuty/blender/pulls/50","html_url":"https://github.com/PagerDuty/blender/pull/50","diff_url":"https://github.com/PagerDuty/blender/pull/50.diff","patch_url":"https://github.com/PagerDuty/blender/pull/50.patch"},"body":"Throwing this out here. This is to fix the output when an ssh command exits with non-zero status. The output currently is:\r\n\r\n```\r\nBlender::ExecutionFailed: #<File:0x00562760b79ca0>\r\n```\r\n\r\nWith this change, the output would be the content of stderr.\r\n\r\nFeedback I would like to get:\r\n* Is using a tempfile instead of /dev/null crazy talk? Do the implications outweigh the benefits?\r\n* How would I test this? Not clear from the code how I would stub the ssh command to return a non-zero exit code, without actually mocking the class under test.\r\n* I would like to also output ~300 characters of standard out as part of `raise ExecutionError, stderr` when a command fails. Is that crazy talk?\r\n\r\nIf this PR seems reasonable, I will put up a different PR with tests, etc."},"comment":{"url":"https://api.github.com/repos/PagerDuty/blender/issues/comments/156229912","html_url":"https://github.com/PagerDuty/blender/pull/50#issuecomment-156229912","issue_url":"https://api.github.com/repos/PagerDuty/blender/issues/50","id":156229912,"user":{"login":"nickpegg","id":265989,"avatar_url":"https://avatars.githubusercontent.com/u/265989?v=3","gravatar_id":"","url":"https://api.github.com/users/nickpegg","html_url":"https://github.com/nickpegg","followers_url":"https://api.github.com/users/nickpegg/followers","following_url":"https://api.github.com/users/nickpegg/following{/other_user}","gists_url":"https://api.github.com/users/nickpegg/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpegg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpegg/subscriptions","organizations_url":"https://api.github.com/users/nickpegg/orgs","repos_url":"https://api.github.com/users/nickpegg/repos","events_url":"https://api.github.com/users/nickpegg/events{/privacy}","received_events_url":"https://api.github.com/users/nickpegg/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T20:50:11Z","updated_at":"2015-11-12T20:50:11Z","body":"You could use a StringIO instead of a temp file if you wanted to avoid touching disk. \r\n\r\n:+1: Looks reasonable to me, but will be behavior if anyone is relying on `ExecOutput` to have `IO`s for stdout/stderr."}}