{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/install/pulls/comments/40290957","id":40290957,"diff_hunk":"@@ -172,16 +181,19 @@ wait_for_user if STDIN.tty?\n \n if File.directory? HOMEBREW_PREFIX\n   sudo \"/bin/chmod\", \"g+rwx\", *chmods unless chmods.empty?\n+  sudo \"/usr/sbin/chown\", ENV['USER'], *chowns unless chowns.empty?\n   sudo \"/usr/bin/chgrp\", \"admin\", *chgrps unless chgrps.empty?\n else\n   sudo \"/bin/mkdir\", HOMEBREW_PREFIX\n   sudo \"/bin/chmod\", \"g+rwx\", HOMEBREW_PREFIX\n   # the group is set to wheel by default for some reason\n-  sudo \"/usr/bin/chgrp\", \"admin\", HOMEBREW_PREFIX\n+  sudo \"/usr/sbin/chown\", \"#{ENV['USER']}:admin\", HOMEBREW_PREFIX\n end\n \n sudo \"/bin/mkdir\", HOMEBREW_CACHE unless File.directory? HOMEBREW_CACHE\n sudo \"/bin/chmod\", \"g+rwx\", HOMEBREW_CACHE if chmod? HOMEBREW_CACHE\n+sudo \"/usr/sbin/chown\", ENV['USER'], HOMEBREW_CACHE if chown? HOMEBREW_CACHE\n+sudo \"/usr/bin/chgrp\", \"admin\", HOMEBREW_CACHE if chgrp? HOMEBREW_CACHE","path":"install","position":46,"original_position":46,"commit_id":"ba1c9df5248d35f890dfe1f591c1645b60545811","original_commit_id":"ba1c9df5248d35f890dfe1f591c1645b60545811","user":{"login":"xu-cheng","id":3105373,"avatar_url":"https://avatars.githubusercontent.com/u/3105373?v=3","gravatar_id":"","url":"https://api.github.com/users/xu-cheng","html_url":"https://github.com/xu-cheng","followers_url":"https://api.github.com/users/xu-cheng/followers","following_url":"https://api.github.com/users/xu-cheng/following{/other_user}","gists_url":"https://api.github.com/users/xu-cheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xu-cheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xu-cheng/subscriptions","organizations_url":"https://api.github.com/users/xu-cheng/orgs","repos_url":"https://api.github.com/users/xu-cheng/repos","events_url":"https://api.github.com/users/xu-cheng/events{/privacy}","received_events_url":"https://api.github.com/users/xu-cheng/received_events","type":"User","site_admin":false},"body":"I'm confused why we need to chown/chgrp for cache directory? We seem never recommend users to do this(though we recommend this for PREFIX a lot). If we really need this, why don't we just start using `~/Library/Cache/Homebrew` as the default cache directory?\r\n\r\nAlso, we did't mention to chown/chgrp this directory in the warning message above, it's bad to do this without users' awareness.","created_at":"2015-09-24T07:15:57Z","updated_at":"2015-09-24T07:15:57Z","html_url":"https://github.com/Homebrew/install/pull/23#discussion_r40290957","pull_request_url":"https://api.github.com/repos/Homebrew/install/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/install/pulls/comments/40290957"},"html":{"href":"https://github.com/Homebrew/install/pull/23#discussion_r40290957"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/install/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/Homebrew/install/pulls/23","id":45815537,"html_url":"https://github.com/Homebrew/install/pull/23","diff_url":"https://github.com/Homebrew/install/pull/23.diff","patch_url":"https://github.com/Homebrew/install/pull/23.patch","issue_url":"https://api.github.com/repos/Homebrew/install/issues/23","number":23,"state":"open","locked":false,"title":"install: chown as user.","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":"We've been trying to avoid doing this for a while but it seems sensible to just do this by default considering how often we're recommending users do it.\r\n\r\nCloses https://github.com/Homebrew/install/issues/21.\r\n\r\nCC @Homebrew/owners ","created_at":"2015-09-23T18:42:48Z","updated_at":"2015-09-24T07:15:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06e40cc2db254af07069a580b0e313e6de2d3db8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/install/pulls/23/commits","review_comments_url":"https://api.github.com/repos/Homebrew/install/pulls/23/comments","review_comment_url":"https://api.github.com/repos/Homebrew/install/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/install/issues/23/comments","statuses_url":"https://api.github.com/repos/Homebrew/install/statuses/ba1c9df5248d35f890dfe1f591c1645b60545811","head":{"label":"Homebrew:chown-user","ref":"chown-user","sha":"ba1c9df5248d35f890dfe1f591c1645b60545811","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":23519392,"name":"install","full_name":"Homebrew/install","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/install","description":":inbox_tray: Homebrew's installer","fork":false,"url":"https://api.github.com/repos/Homebrew/install","forks_url":"https://api.github.com/repos/Homebrew/install/forks","keys_url":"https://api.github.com/repos/Homebrew/install/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Homebrew/install/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Homebrew/install/teams","hooks_url":"https://api.github.com/repos/Homebrew/install/hooks","issue_events_url":"https://api.github.com/repos/Homebrew/install/issues/events{/number}","events_url":"https://api.github.com/repos/Homebrew/install/events","assignees_url":"https://api.github.com/repos/Homebrew/install/assignees{/user}","branches_url":"https://api.github.com/repos/Homebrew/install/branches{/branch}","tags_url":"https://api.github.com/repos/Homebrew/install/tags","blobs_url":"https://api.github.com/repos/Homebrew/install/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Homebrew/install/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Homebrew/install/git/refs{/sha}","trees_url":"https://api.github.com/repos/Homebrew/install/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Homebrew/install/statuses/{sha}","languages_url":"https://api.github.com/repos/Homebrew/install/languages","stargazers_url":"https://api.github.com/repos/Homebrew/install/stargazers","contributors_url":"https://api.github.com/repos/Homebrew/install/contributors","subscribers_url":"https://api.github.com/repos/Homebrew/install/subscribers","subscription_url":"https://api.github.com/repos/Homebrew/install/subscription","commits_url":"https://api.github.com/repos/Homebrew/install/commits{/sha}","git_commits_url":"https://api.github.com/repos/Homebrew/install/git/commits{/sha}","comments_url":"https://api.github.com/repos/Homebrew/install/comments{/number}","issue_comment_url":"https://api.github.com/repos/Homebrew/install/issues/comments{/number}","contents_url":"https://api.github.com/repos/Homebrew/install/contents/{+path}","compare_url":"https://api.github.com/repos/Homebrew/install/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Homebrew/install/merges","archive_url":"https://api.github.com/repos/Homebrew/install/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Homebrew/install/downloads","issues_url":"https://api.github.com/repos/Homebrew/install/issues{/number}","pulls_url":"https://api.github.com/repos/Homebrew/install/pulls{/number}","milestones_url":"https://api.github.com/repos/Homebrew/install/milestones{/number}","notifications_url":"https://api.github.com/repos/Homebrew/install/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Homebrew/install/labels{/name}","releases_url":"https://api.github.com/repos/Homebrew/install/releases{/id}","created_at":"2014-08-31T17:48:16Z","updated_at":"2015-09-15T17:45:09Z","pushed_at":"2015-09-24T07:09:21Z","git_url":"git://github.com/Homebrew/install.git","ssh_url":"git@github.com:Homebrew/install.git","clone_url":"https://github.com/Homebrew/install.git","svn_url":"https://github.com/Homebrew/install","homepage":"http://brew.sh","size":378,"stargazers_count":14,"watchers_count":14,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":3,"forks":18,"open_issues":3,"watchers":14,"default_branch":"master"}},"base":{"label":"Homebrew:master","ref":"master","sha":"f88b9d9a63baac35ca9ada8187bb7653f66c9a89","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":23519392,"name":"install","full_name":"Homebrew/install","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/install","description":":inbox_tray: Homebrew's installer","fork":false,"url":"https://api.github.com/repos/Homebrew/install","forks_url":"https://api.github.com/repos/Homebrew/install/forks","keys_url":"https://api.github.com/repos/Homebrew/install/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Homebrew/install/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Homebrew/install/teams","hooks_url":"https://api.github.com/repos/Homebrew/install/hooks","issue_events_url":"https://api.github.com/repos/Homebrew/install/issues/events{/number}","events_url":"https://api.github.com/repos/Homebrew/install/events","assignees_url":"https://api.github.com/repos/Homebrew/install/assignees{/user}","branches_url":"https://api.github.com/repos/Homebrew/install/branches{/branch}","tags_url":"https://api.github.com/repos/Homebrew/install/tags","blobs_url":"https://api.github.com/repos/Homebrew/install/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Homebrew/install/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Homebrew/install/git/refs{/sha}","trees_url":"https://api.github.com/repos/Homebrew/install/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Homebrew/install/statuses/{sha}","languages_url":"https://api.github.com/repos/Homebrew/install/languages","stargazers_url":"https://api.github.com/repos/Homebrew/install/stargazers","contributors_url":"https://api.github.com/repos/Homebrew/install/contributors","subscribers_url":"https://api.github.com/repos/Homebrew/install/subscribers","subscription_url":"https://api.github.com/repos/Homebrew/install/subscription","commits_url":"https://api.github.com/repos/Homebrew/install/commits{/sha}","git_commits_url":"https://api.github.com/repos/Homebrew/install/git/commits{/sha}","comments_url":"https://api.github.com/repos/Homebrew/install/comments{/number}","issue_comment_url":"https://api.github.com/repos/Homebrew/install/issues/comments{/number}","contents_url":"https://api.github.com/repos/Homebrew/install/contents/{+path}","compare_url":"https://api.github.com/repos/Homebrew/install/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Homebrew/install/merges","archive_url":"https://api.github.com/repos/Homebrew/install/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Homebrew/install/downloads","issues_url":"https://api.github.com/repos/Homebrew/install/issues{/number}","pulls_url":"https://api.github.com/repos/Homebrew/install/pulls{/number}","milestones_url":"https://api.github.com/repos/Homebrew/install/milestones{/number}","notifications_url":"https://api.github.com/repos/Homebrew/install/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Homebrew/install/labels{/name}","releases_url":"https://api.github.com/repos/Homebrew/install/releases{/id}","created_at":"2014-08-31T17:48:16Z","updated_at":"2015-09-15T17:45:09Z","pushed_at":"2015-09-24T07:09:21Z","git_url":"git://github.com/Homebrew/install.git","ssh_url":"git@github.com:Homebrew/install.git","clone_url":"https://github.com/Homebrew/install.git","svn_url":"https://github.com/Homebrew/install","homepage":"http://brew.sh","size":378,"stargazers_count":14,"watchers_count":14,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":3,"forks":18,"open_issues":3,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/install/pulls/23"},"html":{"href":"https://github.com/Homebrew/install/pull/23"},"issue":{"href":"https://api.github.com/repos/Homebrew/install/issues/23"},"comments":{"href":"https://api.github.com/repos/Homebrew/install/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/install/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/install/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/install/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/install/statuses/ba1c9df5248d35f890dfe1f591c1645b60545811"}}}}