{"action":"created","issue":{"url":"https://api.github.com/repos/sstephenson/bats/issues/101","labels_url":"https://api.github.com/repos/sstephenson/bats/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/sstephenson/bats/issues/101/comments","events_url":"https://api.github.com/repos/sstephenson/bats/issues/101/events","html_url":"https://github.com/sstephenson/bats/pull/101","id":73184594,"number":101,"title":"bats_print_failed_command: Include $output if available.","user":{"login":"aluzzardi","id":179503,"avatar_url":"https://avatars.githubusercontent.com/u/179503?v=3","gravatar_id":"","url":"https://api.github.com/users/aluzzardi","html_url":"https://github.com/aluzzardi","followers_url":"https://api.github.com/users/aluzzardi/followers","following_url":"https://api.github.com/users/aluzzardi/following{/other_user}","gists_url":"https://api.github.com/users/aluzzardi/gists{/gist_id}","starred_url":"https://api.github.com/users/aluzzardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aluzzardi/subscriptions","organizations_url":"https://api.github.com/users/aluzzardi/orgs","repos_url":"https://api.github.com/users/aluzzardi/repos","events_url":"https://api.github.com/users/aluzzardi/events{/privacy}","received_events_url":"https://api.github.com/users/aluzzardi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-05T02:37:03Z","updated_at":"2015-05-21T02:36:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sstephenson/bats/pulls/101","html_url":"https://github.com/sstephenson/bats/pull/101","diff_url":"https://github.com/sstephenson/bats/pull/101.diff","patch_url":"https://github.com/sstephenson/bats/pull/101.patch"},"body":"Checking `$status` right after a `run` seems to be a quite regular use case:\r\n\r\n```\r\n@test \"run will fail\" {\r\n\trun blahblah\r\n\t[[ \"$status\" -eq 0 ]]\r\n}\r\n```\r\n\r\nWith this change, the `$output` of run is included in case of failure, which makes debugging much easier:\r\n```\r\n ✗ run will fail\r\n   (in test file broken.bats, line 7)\r\n     `[[ \"$status\" -eq 0 ]]' failed\r\n     bats/libexec/bats-exec-test: line 58: blahblah: command not found\r\n```"},"comment":{"url":"https://api.github.com/repos/sstephenson/bats/issues/comments/104105953","html_url":"https://github.com/sstephenson/bats/pull/101#issuecomment-104105953","issue_url":"https://api.github.com/repos/sstephenson/bats/issues/101","id":104105953,"user":{"login":"miketheman","id":529516,"avatar_url":"https://avatars.githubusercontent.com/u/529516?v=3","gravatar_id":"","url":"https://api.github.com/users/miketheman","html_url":"https://github.com/miketheman","followers_url":"https://api.github.com/users/miketheman/followers","following_url":"https://api.github.com/users/miketheman/following{/other_user}","gists_url":"https://api.github.com/users/miketheman/gists{/gist_id}","starred_url":"https://api.github.com/users/miketheman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miketheman/subscriptions","organizations_url":"https://api.github.com/users/miketheman/orgs","repos_url":"https://api.github.com/users/miketheman/repos","events_url":"https://api.github.com/users/miketheman/events{/privacy}","received_events_url":"https://api.github.com/users/miketheman/received_events","type":"User","site_admin":false},"created_at":"2015-05-21T02:36:37Z","updated_at":"2015-05-21T02:36:37Z","body":":+1: Applied this today locally, looks cool."}}