{"action":"closed","number":2370,"pull_request":{"url":"https://api.github.com/repos/cfengine/core/pulls/2370","id":49213853,"html_url":"https://github.com/cfengine/core/pull/2370","diff_url":"https://github.com/cfengine/core/pull/2370.diff","patch_url":"https://github.com/cfengine/core/pull/2370.patch","issue_url":"https://api.github.com/repos/cfengine/core/issues/2370","number":2370,"state":"closed","locked":false,"title":"returnszero() should not output the output of a command","user":{"login":"worr","id":183837,"avatar_url":"https://avatars.githubusercontent.com/u/183837?v=3","gravatar_id":"","url":"https://api.github.com/users/worr","html_url":"https://github.com/worr","followers_url":"https://api.github.com/users/worr/followers","following_url":"https://api.github.com/users/worr/following{/other_user}","gists_url":"https://api.github.com/users/worr/gists{/gist_id}","starred_url":"https://api.github.com/users/worr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/worr/subscriptions","organizations_url":"https://api.github.com/users/worr/orgs","repos_url":"https://api.github.com/users/worr/repos","events_url":"https://api.github.com/users/worr/events{/privacy}","received_events_url":"https://api.github.com/users/worr/received_events","type":"User","site_admin":false},"body":"`returnzero` is a common command used to generate classes based on the return value of a particular command. Users (at least here at LinkedIn) only care about the exit code of the command, and do not want the output mixed in with the output of CFEngine. This ends up being super confusing, and creating a lot of spurious output to wade through.\r\n\r\nThis has caused our CFEngine developers to pass `useshell` to all of their `returnszero` calls, introducing a more significant cost as well introducing the potential for issues related to shell parsing of commands and influential env vars.\r\n\r\nThis turns the behavior on its head, making no output the default, and allowing the user to drop to a shell if they want to capture the output somehow. This might be controversial.","created_at":"2015-10-29T23:24:00Z","updated_at":"2015-12-29T09:22:49Z","closed_at":"2015-12-29T09:22:49Z","merged_at":null,"merge_commit_sha":"c08d1e278be5580296f97abeaebc281c731ffc2a","assignee":{"login":"kacf","id":4037094,"avatar_url":"https://avatars.githubusercontent.com/u/4037094?v=3","gravatar_id":"","url":"https://api.github.com/users/kacf","html_url":"https://github.com/kacf","followers_url":"https://api.github.com/users/kacf/followers","following_url":"https://api.github.com/users/kacf/following{/other_user}","gists_url":"https://api.github.com/users/kacf/gists{/gist_id}","starred_url":"https://api.github.com/users/kacf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kacf/subscriptions","organizations_url":"https://api.github.com/users/kacf/orgs","repos_url":"https://api.github.com/users/kacf/repos","events_url":"https://api.github.com/users/kacf/events{/privacy}","received_events_url":"https://api.github.com/users/kacf/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/cfengine/core/pulls/2370/commits","review_comments_url":"https://api.github.com/repos/cfengine/core/pulls/2370/comments","review_comment_url":"https://api.github.com/repos/cfengine/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cfengine/core/issues/2370/comments","statuses_url":"https://api.github.com/repos/cfengine/core/statuses/6dabc573952f8f5d402daf3810a5347bb55c353a","head":{"label":"worr:feature/silent-returnszero","ref":"feature/silent-returnszero","sha":"6dabc573952f8f5d402daf3810a5347bb55c353a","user":{"login":"worr","id":183837,"avatar_url":"https://avatars.githubusercontent.com/u/183837?v=3","gravatar_id":"","url":"https://api.github.com/users/worr","html_url":"https://github.com/worr","followers_url":"https://api.github.com/users/worr/followers","following_url":"https://api.github.com/users/worr/following{/other_user}","gists_url":"https://api.github.com/users/worr/gists{/gist_id}","starred_url":"https://api.github.com/users/worr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/worr/subscriptions","organizations_url":"https://api.github.com/users/worr/orgs","repos_url":"https://api.github.com/users/worr/repos","events_url":"https://api.github.com/users/worr/events{/privacy}","received_events_url":"https://api.github.com/users/worr/received_events","type":"User","site_admin":false},"repo":{"id":5564545,"name":"core","full_name":"worr/core","owner":{"login":"worr","id":183837,"avatar_url":"https://avatars.githubusercontent.com/u/183837?v=3","gravatar_id":"","url":"https://api.github.com/users/worr","html_url":"https://github.com/worr","followers_url":"https://api.github.com/users/worr/followers","following_url":"https://api.github.com/users/worr/following{/other_user}","gists_url":"https://api.github.com/users/worr/gists{/gist_id}","starred_url":"https://api.github.com/users/worr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/worr/subscriptions","organizations_url":"https://api.github.com/users/worr/orgs","repos_url":"https://api.github.com/users/worr/repos","events_url":"https://api.github.com/users/worr/events{/privacy}","received_events_url":"https://api.github.com/users/worr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/worr/core","description":"CFEngine Community","fork":true,"url":"https://api.github.com/repos/worr/core","forks_url":"https://api.github.com/repos/worr/core/forks","keys_url":"https://api.github.com/repos/worr/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/worr/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/worr/core/teams","hooks_url":"https://api.github.com/repos/worr/core/hooks","issue_events_url":"https://api.github.com/repos/worr/core/issues/events{/number}","events_url":"https://api.github.com/repos/worr/core/events","assignees_url":"https://api.github.com/repos/worr/core/assignees{/user}","branches_url":"https://api.github.com/repos/worr/core/branches{/branch}","tags_url":"https://api.github.com/repos/worr/core/tags","blobs_url":"https://api.github.com/repos/worr/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/worr/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/worr/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/worr/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/worr/core/statuses/{sha}","languages_url":"https://api.github.com/repos/worr/core/languages","stargazers_url":"https://api.github.com/repos/worr/core/stargazers","contributors_url":"https://api.github.com/repos/worr/core/contributors","subscribers_url":"https://api.github.com/repos/worr/core/subscribers","subscription_url":"https://api.github.com/repos/worr/core/subscription","commits_url":"https://api.github.com/repos/worr/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/worr/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/worr/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/worr/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/worr/core/contents/{+path}","compare_url":"https://api.github.com/repos/worr/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/worr/core/merges","archive_url":"https://api.github.com/repos/worr/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/worr/core/downloads","issues_url":"https://api.github.com/repos/worr/core/issues{/number}","pulls_url":"https://api.github.com/repos/worr/core/pulls{/number}","milestones_url":"https://api.github.com/repos/worr/core/milestones{/number}","notifications_url":"https://api.github.com/repos/worr/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/worr/core/labels{/name}","releases_url":"https://api.github.com/repos/worr/core/releases{/id}","created_at":"2012-08-26T23:16:25Z","updated_at":"2015-05-05T22:58:21Z","pushed_at":"2015-12-29T08:10:29Z","git_url":"git://github.com/worr/core.git","ssh_url":"git@github.com:worr/core.git","clone_url":"https://github.com/worr/core.git","svn_url":"https://github.com/worr/core","homepage":"https://cfengine.com/community/","size":50940,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cfengine:master","ref":"master","sha":"6929de02ae1084c20f89ade7f2653ee8860baee0","user":{"login":"cfengine","id":1239823,"avatar_url":"https://avatars.githubusercontent.com/u/1239823?v=3","gravatar_id":"","url":"https://api.github.com/users/cfengine","html_url":"https://github.com/cfengine","followers_url":"https://api.github.com/users/cfengine/followers","following_url":"https://api.github.com/users/cfengine/following{/other_user}","gists_url":"https://api.github.com/users/cfengine/gists{/gist_id}","starred_url":"https://api.github.com/users/cfengine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfengine/subscriptions","organizations_url":"https://api.github.com/users/cfengine/orgs","repos_url":"https://api.github.com/users/cfengine/repos","events_url":"https://api.github.com/users/cfengine/events{/privacy}","received_events_url":"https://api.github.com/users/cfengine/received_events","type":"Organization","site_admin":false},"repo":{"id":3543548,"name":"core","full_name":"cfengine/core","owner":{"login":"cfengine","id":1239823,"avatar_url":"https://avatars.githubusercontent.com/u/1239823?v=3","gravatar_id":"","url":"https://api.github.com/users/cfengine","html_url":"https://github.com/cfengine","followers_url":"https://api.github.com/users/cfengine/followers","following_url":"https://api.github.com/users/cfengine/following{/other_user}","gists_url":"https://api.github.com/users/cfengine/gists{/gist_id}","starred_url":"https://api.github.com/users/cfengine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfengine/subscriptions","organizations_url":"https://api.github.com/users/cfengine/orgs","repos_url":"https://api.github.com/users/cfengine/repos","events_url":"https://api.github.com/users/cfengine/events{/privacy}","received_events_url":"https://api.github.com/users/cfengine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cfengine/core","description":"CFEngine Community","fork":false,"url":"https://api.github.com/repos/cfengine/core","forks_url":"https://api.github.com/repos/cfengine/core/forks","keys_url":"https://api.github.com/repos/cfengine/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cfengine/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cfengine/core/teams","hooks_url":"https://api.github.com/repos/cfengine/core/hooks","issue_events_url":"https://api.github.com/repos/cfengine/core/issues/events{/number}","events_url":"https://api.github.com/repos/cfengine/core/events","assignees_url":"https://api.github.com/repos/cfengine/core/assignees{/user}","branches_url":"https://api.github.com/repos/cfengine/core/branches{/branch}","tags_url":"https://api.github.com/repos/cfengine/core/tags","blobs_url":"https://api.github.com/repos/cfengine/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cfengine/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cfengine/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/cfengine/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cfengine/core/statuses/{sha}","languages_url":"https://api.github.com/repos/cfengine/core/languages","stargazers_url":"https://api.github.com/repos/cfengine/core/stargazers","contributors_url":"https://api.github.com/repos/cfengine/core/contributors","subscribers_url":"https://api.github.com/repos/cfengine/core/subscribers","subscription_url":"https://api.github.com/repos/cfengine/core/subscription","commits_url":"https://api.github.com/repos/cfengine/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/cfengine/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/cfengine/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/cfengine/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/cfengine/core/contents/{+path}","compare_url":"https://api.github.com/repos/cfengine/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cfengine/core/merges","archive_url":"https://api.github.com/repos/cfengine/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cfengine/core/downloads","issues_url":"https://api.github.com/repos/cfengine/core/issues{/number}","pulls_url":"https://api.github.com/repos/cfengine/core/pulls{/number}","milestones_url":"https://api.github.com/repos/cfengine/core/milestones{/number}","notifications_url":"https://api.github.com/repos/cfengine/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cfengine/core/labels{/name}","releases_url":"https://api.github.com/repos/cfengine/core/releases{/id}","created_at":"2012-02-25T09:19:05Z","updated_at":"2015-12-17T08:13:20Z","pushed_at":"2015-12-29T09:20:17Z","git_url":"git://github.com/cfengine/core.git","ssh_url":"git@github.com:cfengine/core.git","clone_url":"https://github.com/cfengine/core.git","svn_url":"https://github.com/cfengine/core","homepage":"https://cfengine.com/community/","size":58513,"stargazers_count":228,"watchers_count":228,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":143,"mirror_url":null,"open_issues_count":19,"forks":143,"open_issues":19,"watchers":228,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cfengine/core/pulls/2370"},"html":{"href":"https://github.com/cfengine/core/pull/2370"},"issue":{"href":"https://api.github.com/repos/cfengine/core/issues/2370"},"comments":{"href":"https://api.github.com/repos/cfengine/core/issues/2370/comments"},"review_comments":{"href":"https://api.github.com/repos/cfengine/core/pulls/2370/comments"},"review_comment":{"href":"https://api.github.com/repos/cfengine/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cfengine/core/pulls/2370/commits"},"statuses":{"href":"https://api.github.com/repos/cfengine/core/statuses/6dabc573952f8f5d402daf3810a5347bb55c353a"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":19,"review_comments":3,"commits":1,"additions":49,"deletions":1,"changed_files":4}}