{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/comments/94287576","pull_request_review_id":14816468,"id":94287576,"diff_hunk":"@@ -0,0 +1,71 @@\n+keepkeys=(\n+HOMEBREW_*\n+GEM_*\n+HOME\n+PWD\n+LANG\n+PATH\n+)\n+\n+prune-shell-env() {\n+  # Associative arrays are only a Bash 4 feature\n+  #declare -A aEnv\n+\n+  local verbose\n+  \n+  local envPATH=`which env`\n+  local echoPATH=`which echo`\n+  local sedPATH=`which sed`\n+\n+  file=$HOMEBREW_LIBRARY/Homebrew/utils/shell-env.txt\n+  if [[ -n \"$HOMEBREW_VERBOSE\" ]]\n+  then\n+    $echoPATH \n+    $echoPATH \"---- ENV pruning ----\"\n+    $echoPATH \"Writing current env to '\"$file\"'\"\n+    # Need to keep a local record of 'HOMEBREW_VERBOSE=1' since will be temp unset\n+    verbose=1\n+  fi\n+  \n+  $envPATH > $file\n+  \n+  unset `$envPATH | $sedPATH -e 's/=.*//'`\n+  \n+  for i in ${keepkeys[*]}\n+  do\n+  \n+    if [[ -n \"$verbose\" ]]\n+    then\n+      $echoPATH \"Keeping: \"$i\n+    fi\n+    \n+    IFS=\"=\"\n+    while read key value\n+    do\n+      if [[ $key == $i ]]\n+      then\n+      \n+        if [[ -n \"$verbose\" ]]\n+        then\n+          $echoPATH $key\"=\"$value\n+        fi\n+\n+        export $key\"=\"$value\n+      fi\n+    done < \"$file\"\n+\n+  done\n+\n+  pfile=$HOMEBREW_LIBRARY/Homebrew/utils/shell-env-pruned.txt\n+  if [[ -n \"$verbose\" ]]\n+  then\n+    $echoPATH \"Writing new env to '\"$pfile\"'\"\n+    $echoPATH \"---------------------\"\n+    $echoPATH\n+  fi","path":"Library/Homebrew/utils/shell_env.sh","position":65,"original_position":65,"commit_id":"7c70a7e8d5142a380c7ad2caca50c9c6dabe2835","original_commit_id":"7c70a7e8d5142a380c7ad2caca50c9c6dabe2835","user":{"login":"MikeMcQuaid","id":125011,"avatar_url":"https://avatars.githubusercontent.com/u/125011?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeMcQuaid","html_url":"https://github.com/MikeMcQuaid","followers_url":"https://api.github.com/users/MikeMcQuaid/followers","following_url":"https://api.github.com/users/MikeMcQuaid/following{/other_user}","gists_url":"https://api.github.com/users/MikeMcQuaid/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeMcQuaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeMcQuaid/subscriptions","organizations_url":"https://api.github.com/users/MikeMcQuaid/orgs","repos_url":"https://api.github.com/users/MikeMcQuaid/repos","events_url":"https://api.github.com/users/MikeMcQuaid/events{/privacy}","received_events_url":"https://api.github.com/users/MikeMcQuaid/received_events","type":"User","site_admin":true},"body":"Ok, let's just kill it for now, thanks.","created_at":"2017-01-01T18:49:15Z","updated_at":"2017-01-01T18:49:15Z","html_url":"https://github.com/Homebrew/brew/pull/1753#discussion_r94287576","pull_request_url":"https://api.github.com/repos/Homebrew/brew/pulls/1753","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments/94287576"},"html":{"href":"https://github.com/Homebrew/brew/pull/1753#discussion_r94287576"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/1753"}}},"pull_request":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/1753","id":99778929,"html_url":"https://github.com/Homebrew/brew/pull/1753","diff_url":"https://github.com/Homebrew/brew/pull/1753.diff","patch_url":"https://github.com/Homebrew/brew/pull/1753.patch","issue_url":"https://api.github.com/repos/Homebrew/brew/issues/1753","number":1753,"state":"open","locked":false,"title":"Suggested solution for 'Filter all environment variables by default #932' issue","user":{"login":"doughazell","id":1555987,"avatar_url":"https://avatars.githubusercontent.com/u/1555987?v=3","gravatar_id":"","url":"https://api.github.com/users/doughazell","html_url":"https://github.com/doughazell","followers_url":"https://api.github.com/users/doughazell/followers","following_url":"https://api.github.com/users/doughazell/following{/other_user}","gists_url":"https://api.github.com/users/doughazell/gists{/gist_id}","starred_url":"https://api.github.com/users/doughazell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doughazell/subscriptions","organizations_url":"https://api.github.com/users/doughazell/orgs","repos_url":"https://api.github.com/users/doughazell/repos","events_url":"https://api.github.com/users/doughazell/events{/privacy}","received_events_url":"https://api.github.com/users/doughazell/received_events","type":"User","site_admin":false},"body":"1) Code to list env vars to be readded after removing all\r\n2) Changes necessary to be able to add \" require 'byebug' \" and 'debugger' to check passed ENV\r\n\r\n- [ ] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md) document?\r\n- [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/Homebrew/brew/pulls) for the same change?\r\n- [ ] Have you added an explanation of what your changes do and why you'd like us to include them?\r\n- [ ] Have you written new tests for your changes? [Here's an example](https://github.com/Homebrew/homebrew/pull/49031).\r\n- [ ] Have you successfully run `brew tests` with your changes locally?\r\n\r\n-----\r\n","created_at":"2016-12-30T19:54:32Z","updated_at":"2017-01-01T18:49:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b95666d3831ce692a0ec324fc0f8c7b3fffb0d3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/brew/pulls/1753/commits","review_comments_url":"https://api.github.com/repos/Homebrew/brew/pulls/1753/comments","review_comment_url":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/brew/issues/1753/comments","statuses_url":"https://api.github.com/repos/Homebrew/brew/statuses/7c70a7e8d5142a380c7ad2caca50c9c6dabe2835","head":{"label":"doughazell:filter_all_env_vars_932","ref":"filter_all_env_vars_932","sha":"7c70a7e8d5142a380c7ad2caca50c9c6dabe2835","user":{"login":"doughazell","id":1555987,"avatar_url":"https://avatars.githubusercontent.com/u/1555987?v=3","gravatar_id":"","url":"https://api.github.com/users/doughazell","html_url":"https://github.com/doughazell","followers_url":"https://api.github.com/users/doughazell/followers","following_url":"https://api.github.com/users/doughazell/following{/other_user}","gists_url":"https://api.github.com/users/doughazell/gists{/gist_id}","starred_url":"https://api.github.com/users/doughazell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doughazell/subscriptions","organizations_url":"https://api.github.com/users/doughazell/orgs","repos_url":"https://api.github.com/users/doughazell/repos","events_url":"https://api.github.com/users/doughazell/events{/privacy}","received_events_url":"https://api.github.com/users/doughazell/received_events","type":"User","site_admin":false},"repo":{"id":76252837,"name":"brew","full_name":"doughazell/brew","owner":{"login":"doughazell","id":1555987,"avatar_url":"https://avatars.githubusercontent.com/u/1555987?v=3","gravatar_id":"","url":"https://api.github.com/users/doughazell","html_url":"https://github.com/doughazell","followers_url":"https://api.github.com/users/doughazell/followers","following_url":"https://api.github.com/users/doughazell/following{/other_user}","gists_url":"https://api.github.com/users/doughazell/gists{/gist_id}","starred_url":"https://api.github.com/users/doughazell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doughazell/subscriptions","organizations_url":"https://api.github.com/users/doughazell/orgs","repos_url":"https://api.github.com/users/doughazell/repos","events_url":"https://api.github.com/users/doughazell/events{/privacy}","received_events_url":"https://api.github.com/users/doughazell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/doughazell/brew","description":":beer: The missing package manager for macOS","fork":true,"url":"https://api.github.com/repos/doughazell/brew","forks_url":"https://api.github.com/repos/doughazell/brew/forks","keys_url":"https://api.github.com/repos/doughazell/brew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/doughazell/brew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/doughazell/brew/teams","hooks_url":"https://api.github.com/repos/doughazell/brew/hooks","issue_events_url":"https://api.github.com/repos/doughazell/brew/issues/events{/number}","events_url":"https://api.github.com/repos/doughazell/brew/events","assignees_url":"https://api.github.com/repos/doughazell/brew/assignees{/user}","branches_url":"https://api.github.com/repos/doughazell/brew/branches{/branch}","tags_url":"https://api.github.com/repos/doughazell/brew/tags","blobs_url":"https://api.github.com/repos/doughazell/brew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/doughazell/brew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/doughazell/brew/git/refs{/sha}","trees_url":"https://api.github.com/repos/doughazell/brew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/doughazell/brew/statuses/{sha}","languages_url":"https://api.github.com/repos/doughazell/brew/languages","stargazers_url":"https://api.github.com/repos/doughazell/brew/stargazers","contributors_url":"https://api.github.com/repos/doughazell/brew/contributors","subscribers_url":"https://api.github.com/repos/doughazell/brew/subscribers","subscription_url":"https://api.github.com/repos/doughazell/brew/subscription","commits_url":"https://api.github.com/repos/doughazell/brew/commits{/sha}","git_commits_url":"https://api.github.com/repos/doughazell/brew/git/commits{/sha}","comments_url":"https://api.github.com/repos/doughazell/brew/comments{/number}","issue_comment_url":"https://api.github.com/repos/doughazell/brew/issues/comments{/number}","contents_url":"https://api.github.com/repos/doughazell/brew/contents/{+path}","compare_url":"https://api.github.com/repos/doughazell/brew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/doughazell/brew/merges","archive_url":"https://api.github.com/repos/doughazell/brew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/doughazell/brew/downloads","issues_url":"https://api.github.com/repos/doughazell/brew/issues{/number}","pulls_url":"https://api.github.com/repos/doughazell/brew/pulls{/number}","milestones_url":"https://api.github.com/repos/doughazell/brew/milestones{/number}","notifications_url":"https://api.github.com/repos/doughazell/brew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/doughazell/brew/labels{/name}","releases_url":"https://api.github.com/repos/doughazell/brew/releases{/id}","deployments_url":"https://api.github.com/repos/doughazell/brew/deployments","created_at":"2016-12-12T12:05:01Z","updated_at":"2016-12-12T12:05:03Z","pushed_at":"2016-12-30T19:50:50Z","git_url":"git://github.com/doughazell/brew.git","ssh_url":"git@github.com:doughazell/brew.git","clone_url":"https://github.com/doughazell/brew.git","svn_url":"https://github.com/doughazell/brew","homepage":"http://brew.sh","size":18098,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"Homebrew:master","ref":"master","sha":"c29a458dc15efc92e3649155d0ed44bf982cdc15","user":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"repo":{"id":53238813,"name":"brew","full_name":"Homebrew/brew","owner":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Homebrew/brew","description":":beer: The missing package manager for macOS","fork":false,"url":"https://api.github.com/repos/Homebrew/brew","forks_url":"https://api.github.com/repos/Homebrew/brew/forks","keys_url":"https://api.github.com/repos/Homebrew/brew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Homebrew/brew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Homebrew/brew/teams","hooks_url":"https://api.github.com/repos/Homebrew/brew/hooks","issue_events_url":"https://api.github.com/repos/Homebrew/brew/issues/events{/number}","events_url":"https://api.github.com/repos/Homebrew/brew/events","assignees_url":"https://api.github.com/repos/Homebrew/brew/assignees{/user}","branches_url":"https://api.github.com/repos/Homebrew/brew/branches{/branch}","tags_url":"https://api.github.com/repos/Homebrew/brew/tags","blobs_url":"https://api.github.com/repos/Homebrew/brew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Homebrew/brew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Homebrew/brew/git/refs{/sha}","trees_url":"https://api.github.com/repos/Homebrew/brew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Homebrew/brew/statuses/{sha}","languages_url":"https://api.github.com/repos/Homebrew/brew/languages","stargazers_url":"https://api.github.com/repos/Homebrew/brew/stargazers","contributors_url":"https://api.github.com/repos/Homebrew/brew/contributors","subscribers_url":"https://api.github.com/repos/Homebrew/brew/subscribers","subscription_url":"https://api.github.com/repos/Homebrew/brew/subscription","commits_url":"https://api.github.com/repos/Homebrew/brew/commits{/sha}","git_commits_url":"https://api.github.com/repos/Homebrew/brew/git/commits{/sha}","comments_url":"https://api.github.com/repos/Homebrew/brew/comments{/number}","issue_comment_url":"https://api.github.com/repos/Homebrew/brew/issues/comments{/number}","contents_url":"https://api.github.com/repos/Homebrew/brew/contents/{+path}","compare_url":"https://api.github.com/repos/Homebrew/brew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Homebrew/brew/merges","archive_url":"https://api.github.com/repos/Homebrew/brew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Homebrew/brew/downloads","issues_url":"https://api.github.com/repos/Homebrew/brew/issues{/number}","pulls_url":"https://api.github.com/repos/Homebrew/brew/pulls{/number}","milestones_url":"https://api.github.com/repos/Homebrew/brew/milestones{/number}","notifications_url":"https://api.github.com/repos/Homebrew/brew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Homebrew/brew/labels{/name}","releases_url":"https://api.github.com/repos/Homebrew/brew/releases{/id}","deployments_url":"https://api.github.com/repos/Homebrew/brew/deployments","created_at":"2016-03-06T05:08:38Z","updated_at":"2017-01-01T15:31:03Z","pushed_at":"2017-01-01T18:26:05Z","git_url":"git://github.com/Homebrew/brew.git","ssh_url":"git@github.com:Homebrew/brew.git","clone_url":"https://github.com/Homebrew/brew.git","svn_url":"https://github.com/Homebrew/brew","homepage":"http://brew.sh","size":18143,"stargazers_count":5441,"watchers_count":5441,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1482,"mirror_url":null,"open_issues_count":50,"forks":1482,"open_issues":50,"watchers":5441,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/1753"},"html":{"href":"https://github.com/Homebrew/brew/pull/1753"},"issue":{"href":"https://api.github.com/repos/Homebrew/brew/issues/1753"},"comments":{"href":"https://api.github.com/repos/Homebrew/brew/issues/1753/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/1753/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/1753/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/brew/statuses/7c70a7e8d5142a380c7ad2caca50c9c6dabe2835"}}}}
{"actor":{"display_login":"MikeMcQuaid"}}