{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/comments/228700263","pull_request_review_id":169042365,"id":228700263,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODcwMDI2Mw==","diff_hunk":"@@ -37,7 +37,7 @@\n   homebrew_path = PATH.new(ENV[\"HOMEBREW_PATH\"])\n \n   # Add SCM wrappers.\n-  path.append(HOMEBREW_SHIMS_PATH/\"scm\")\n+  path.prepend(HOMEBREW_SHIMS_PATH/\"scm\")\n   homebrew_path.append(HOMEBREW_SHIMS_PATH/\"scm\")","path":"Library/Homebrew/brew.rb","position":6,"original_position":6,"commit_id":"2ec99e1757f786748f40c78caaadbf1c30cf3ce9","original_commit_id":"2ec99e1757f786748f40c78caaadbf1c30cf3ce9","user":{"login":"EricFromCanada","id":3324775,"node_id":"MDQ6VXNlcjMzMjQ3NzU=","avatar_url":"https://avatars3.githubusercontent.com/u/3324775?v=4","gravatar_id":"","url":"https://api.github.com/users/EricFromCanada","html_url":"https://github.com/EricFromCanada","followers_url":"https://api.github.com/users/EricFromCanada/followers","following_url":"https://api.github.com/users/EricFromCanada/following{/other_user}","gists_url":"https://api.github.com/users/EricFromCanada/gists{/gist_id}","starred_url":"https://api.github.com/users/EricFromCanada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricFromCanada/subscriptions","organizations_url":"https://api.github.com/users/EricFromCanada/orgs","repos_url":"https://api.github.com/users/EricFromCanada/repos","events_url":"https://api.github.com/users/EricFromCanada/events{/privacy}","received_events_url":"https://api.github.com/users/EricFromCanada/received_events","type":"User","site_admin":false},"body":"Or to put it another way, is it likely that an external command would want to use the `git` specified by `HOMEBREW_GIT` (e.g. if set with `HOMEBREW_GIT_PATH`) rather than whichever is first in the user's `PATH`? I'd say yes.","created_at":"2018-10-27T03:50:10Z","updated_at":"2018-10-27T03:50:10Z","html_url":"https://github.com/Homebrew/brew/pull/5182#discussion_r228700263","pull_request_url":"https://api.github.com/repos/Homebrew/brew/pulls/5182","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments/228700263"},"html":{"href":"https://github.com/Homebrew/brew/pull/5182#discussion_r228700263"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/5182"}},"in_reply_to_id":228670511},"pull_request":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/5182","id":225630232,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1NjMwMjMy","html_url":"https://github.com/Homebrew/brew/pull/5182","diff_url":"https://github.com/Homebrew/brew/pull/5182.diff","patch_url":"https://github.com/Homebrew/brew/pull/5182.patch","issue_url":"https://api.github.com/repos/Homebrew/brew/issues/5182","number":5182,"state":"open","locked":false,"title":"Prepend shims path to PATH used by `system` and `safe_system`","user":{"login":"EricFromCanada","id":3324775,"node_id":"MDQ6VXNlcjMzMjQ3NzU=","avatar_url":"https://avatars3.githubusercontent.com/u/3324775?v=4","gravatar_id":"","url":"https://api.github.com/users/EricFromCanada","html_url":"https://github.com/EricFromCanada","followers_url":"https://api.github.com/users/EricFromCanada/followers","following_url":"https://api.github.com/users/EricFromCanada/following{/other_user}","gists_url":"https://api.github.com/users/EricFromCanada/gists{/gist_id}","starred_url":"https://api.github.com/users/EricFromCanada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricFromCanada/subscriptions","organizations_url":"https://api.github.com/users/EricFromCanada/orgs","repos_url":"https://api.github.com/users/EricFromCanada/repos","events_url":"https://api.github.com/users/EricFromCanada/events{/privacy}","received_events_url":"https://api.github.com/users/EricFromCanada/received_events","type":"User","site_admin":false},"body":"- [x] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md) document?\r\n- [x] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/Homebrew/brew/pulls) for the same change?\r\n- [x] 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/brew/blob/master/Library/Homebrew/test/PATH_spec.rb).\r\n- [x] Have you successfully run `brew style` with your changes locally?\r\n- [x] Have you successfully run `brew tests` with your changes locally?\r\n\r\n-----\r\nWhile writing [this forum post](https://discourse.brew.sh/t/help-needed-to-install-under-osx-10-6-8/3253/4), I found that Git commands run by `system` and `safe_system` always use the system-provided `git`, as shown by running `brew ruby -e 'safe_system \"git\", \"--version\"'` on an OS X 10.11 system (which should always be using a brewed Git):\r\n```\r\n$ brew config\r\nHOMEBREW_VERSION: 1.8.0-39-g3939908\r\nORIGIN: https://github.com/Homebrew/brew.git\r\nHEAD: 39399085b113fb309507d51d0d7801490359b8da\r\nLast commit: 44 minutes ago\r\nCore tap ORIGIN: https://github.com/Homebrew/homebrew-core\r\nCore tap HEAD: 55ecb060faead81c7ea5f075bc4939c1e6a1b39a\r\nCore tap last commit: 8 hours ago\r\nHOMEBREW_PREFIX: /usr/local\r\nHOMEBREW_DEV_CMD_RUN: 1\r\nCPU: octa-core 64-bit haswell\r\nHomebrew Ruby: 2.3.7 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/bin/ruby\r\nClang: 8.0 build 800\r\nGit: 2.19.0 => /usr/local/opt/git/bin/git\r\nCurl: 7.43.0 => /usr/bin/curl\r\nJava: 1.8.0_111, 1.6.0_65-b14-468\r\nmacOS: 10.11.6-x86_64\r\nCLT: 8.2.0.0.1.1480973914\r\nXcode: 8.2.1\r\nXQuartz: 2.7.11 => /opt/X11\r\n\r\n$ brew ruby -e 'safe_system \"git\", \"--version\"'\r\ngit version 2.10.1 (Apple Git-78)\r\n```\r\nAlthough this isn't as much of an issue on newer macOS versions, it does mean that a custom `git` path set by `HOMEBREW_GIT_PATH` won't be used.\r\n\r\nThis change prepends Homebrew's `git` shim to the `PATH` used by `system` and `safe_system`, instead of appending.\r\n\r\nI also updated the manual to more accurately reflect how Homebrew decides which `git` (and `curl`) to use, and hid `HOMEBREW_GIT` from `brew config`'s output, since it isn't directly settable \r\nfrom the environment and is already printed beside the Git version number further down.","created_at":"2018-10-25T05:42:59Z","updated_at":"2018-10-27T03:50:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8fc11cd1d27c05b449dd138027a133f81e4bef79","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/brew/pulls/5182/commits","review_comments_url":"https://api.github.com/repos/Homebrew/brew/pulls/5182/comments","review_comment_url":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/brew/issues/5182/comments","statuses_url":"https://api.github.com/repos/Homebrew/brew/statuses/2ec99e1757f786748f40c78caaadbf1c30cf3ce9","head":{"label":"EricFromCanada:prepend-shims-path","ref":"prepend-shims-path","sha":"2ec99e1757f786748f40c78caaadbf1c30cf3ce9","user":{"login":"EricFromCanada","id":3324775,"node_id":"MDQ6VXNlcjMzMjQ3NzU=","avatar_url":"https://avatars3.githubusercontent.com/u/3324775?v=4","gravatar_id":"","url":"https://api.github.com/users/EricFromCanada","html_url":"https://github.com/EricFromCanada","followers_url":"https://api.github.com/users/EricFromCanada/followers","following_url":"https://api.github.com/users/EricFromCanada/following{/other_user}","gists_url":"https://api.github.com/users/EricFromCanada/gists{/gist_id}","starred_url":"https://api.github.com/users/EricFromCanada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricFromCanada/subscriptions","organizations_url":"https://api.github.com/users/EricFromCanada/orgs","repos_url":"https://api.github.com/users/EricFromCanada/repos","events_url":"https://api.github.com/users/EricFromCanada/events{/privacy}","received_events_url":"https://api.github.com/users/EricFromCanada/received_events","type":"User","site_admin":false},"repo":{"id":82861753,"node_id":"MDEwOlJlcG9zaXRvcnk4Mjg2MTc1Mw==","name":"brew","full_name":"EricFromCanada/brew","private":false,"owner":{"login":"EricFromCanada","id":3324775,"node_id":"MDQ6VXNlcjMzMjQ3NzU=","avatar_url":"https://avatars3.githubusercontent.com/u/3324775?v=4","gravatar_id":"","url":"https://api.github.com/users/EricFromCanada","html_url":"https://github.com/EricFromCanada","followers_url":"https://api.github.com/users/EricFromCanada/followers","following_url":"https://api.github.com/users/EricFromCanada/following{/other_user}","gists_url":"https://api.github.com/users/EricFromCanada/gists{/gist_id}","starred_url":"https://api.github.com/users/EricFromCanada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricFromCanada/subscriptions","organizations_url":"https://api.github.com/users/EricFromCanada/orgs","repos_url":"https://api.github.com/users/EricFromCanada/repos","events_url":"https://api.github.com/users/EricFromCanada/events{/privacy}","received_events_url":"https://api.github.com/users/EricFromCanada/received_events","type":"User","site_admin":false},"html_url":"https://github.com/EricFromCanada/brew","description":"🍺 The missing package manager for macOS","fork":true,"url":"https://api.github.com/repos/EricFromCanada/brew","forks_url":"https://api.github.com/repos/EricFromCanada/brew/forks","keys_url":"https://api.github.com/repos/EricFromCanada/brew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EricFromCanada/brew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EricFromCanada/brew/teams","hooks_url":"https://api.github.com/repos/EricFromCanada/brew/hooks","issue_events_url":"https://api.github.com/repos/EricFromCanada/brew/issues/events{/number}","events_url":"https://api.github.com/repos/EricFromCanada/brew/events","assignees_url":"https://api.github.com/repos/EricFromCanada/brew/assignees{/user}","branches_url":"https://api.github.com/repos/EricFromCanada/brew/branches{/branch}","tags_url":"https://api.github.com/repos/EricFromCanada/brew/tags","blobs_url":"https://api.github.com/repos/EricFromCanada/brew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EricFromCanada/brew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EricFromCanada/brew/git/refs{/sha}","trees_url":"https://api.github.com/repos/EricFromCanada/brew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EricFromCanada/brew/statuses/{sha}","languages_url":"https://api.github.com/repos/EricFromCanada/brew/languages","stargazers_url":"https://api.github.com/repos/EricFromCanada/brew/stargazers","contributors_url":"https://api.github.com/repos/EricFromCanada/brew/contributors","subscribers_url":"https://api.github.com/repos/EricFromCanada/brew/subscribers","subscription_url":"https://api.github.com/repos/EricFromCanada/brew/subscription","commits_url":"https://api.github.com/repos/EricFromCanada/brew/commits{/sha}","git_commits_url":"https://api.github.com/repos/EricFromCanada/brew/git/commits{/sha}","comments_url":"https://api.github.com/repos/EricFromCanada/brew/comments{/number}","issue_comment_url":"https://api.github.com/repos/EricFromCanada/brew/issues/comments{/number}","contents_url":"https://api.github.com/repos/EricFromCanada/brew/contents/{+path}","compare_url":"https://api.github.com/repos/EricFromCanada/brew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EricFromCanada/brew/merges","archive_url":"https://api.github.com/repos/EricFromCanada/brew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EricFromCanada/brew/downloads","issues_url":"https://api.github.com/repos/EricFromCanada/brew/issues{/number}","pulls_url":"https://api.github.com/repos/EricFromCanada/brew/pulls{/number}","milestones_url":"https://api.github.com/repos/EricFromCanada/brew/milestones{/number}","notifications_url":"https://api.github.com/repos/EricFromCanada/brew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EricFromCanada/brew/labels{/name}","releases_url":"https://api.github.com/repos/EricFromCanada/brew/releases{/id}","deployments_url":"https://api.github.com/repos/EricFromCanada/brew/deployments","created_at":"2017-02-22T23:10:22Z","updated_at":"2018-10-23T23:15:13Z","pushed_at":"2018-10-26T21:11:44Z","git_url":"git://github.com/EricFromCanada/brew.git","ssh_url":"git@github.com:EricFromCanada/brew.git","clone_url":"https://github.com/EricFromCanada/brew.git","svn_url":"https://github.com/EricFromCanada/brew","homepage":"http://brew.sh","size":26771,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Homebrew:master","ref":"master","sha":"57f7b8a8a4f2d8480d1811146c3a625bc2726ad3","user":{"login":"Homebrew","id":1503512,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDM1MTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1503512?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk1MzIzODgxMw==","name":"brew","full_name":"Homebrew/brew","private":false,"owner":{"login":"Homebrew","id":1503512,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDM1MTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1503512?v=4","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},"html_url":"https://github.com/Homebrew/brew","description":"🍺 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":"2018-10-27T03:37:12Z","pushed_at":"2018-10-27T00:51:23Z","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":"https://brew.sh","size":26781,"stargazers_count":14708,"watchers_count":14708,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":3305,"mirror_url":null,"archived":false,"open_issues_count":32,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":3305,"open_issues":32,"watchers":14708,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/5182"},"html":{"href":"https://github.com/Homebrew/brew/pull/5182"},"issue":{"href":"https://api.github.com/repos/Homebrew/brew/issues/5182"},"comments":{"href":"https://api.github.com/repos/Homebrew/brew/issues/5182/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/5182/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/5182/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/brew/statuses/2ec99e1757f786748f40c78caaadbf1c30cf3ce9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"EricFromCanada"}}