{"action":"created","comment":{"url":"https://api.github.com/repos/docker/notary/pulls/comments/39344442","id":39344442,"diff_hunk":"@@ -37,14 +37,11 @@ func parseConfig() {\n \t}\n \n \tif trustDir == \"\" {\n-\t\t// Retrieve current user to get home directory\n-\t\tusr, err := user.Current()\n+\t\t// Get home directory for current user\n+\t\thomeDir, err := homedir.Dir()\n \t\tif err != nil {\n-\t\t\tfatalf(\"cannot get current user: %v\", err)\n+\t\t\tfatalf(\"cannot get current user home directory: %v\", err)\n \t\t}\n-\n-\t\t// Get home directory for current user\n-\t\thomeDir := usr.HomeDir\n \t\tif homeDir == \"\" {","path":"cmd/notary/main.go","position":28,"original_position":28,"commit_id":"f7d0ea70af0547eba18410e9e841dc735243fa43","original_commit_id":"f7d0ea70af0547eba18410e9e841dc735243fa43","user":{"login":"jbeda","id":37310,"avatar_url":"https://avatars.githubusercontent.com/u/37310?v=3","gravatar_id":"","url":"https://api.github.com/users/jbeda","html_url":"https://github.com/jbeda","followers_url":"https://api.github.com/users/jbeda/followers","following_url":"https://api.github.com/users/jbeda/following{/other_user}","gists_url":"https://api.github.com/users/jbeda/gists{/gist_id}","starred_url":"https://api.github.com/users/jbeda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbeda/subscriptions","organizations_url":"https://api.github.com/users/jbeda/orgs","repos_url":"https://api.github.com/users/jbeda/repos","events_url":"https://api.github.com/users/jbeda/events{/privacy}","received_events_url":"https://api.github.com/users/jbeda/received_events","type":"User","site_admin":false},"body":"I left this in deliberately.  It is possible that go-homedir might (at some point in the future if not now) return no error and a blank string.  That could lead to the path being based, silently, on the current dir instead of the home dir.\r\n\r\nI'm happy to remove it but it felt more defensive this way.  Let me know.","created_at":"2015-09-13T04:49:16Z","updated_at":"2015-09-13T04:49:16Z","html_url":"https://github.com/docker/notary/pull/195#discussion_r39344442","pull_request_url":"https://api.github.com/repos/docker/notary/pulls/195","_links":{"self":{"href":"https://api.github.com/repos/docker/notary/pulls/comments/39344442"},"html":{"href":"https://github.com/docker/notary/pull/195#discussion_r39344442"},"pull_request":{"href":"https://api.github.com/repos/docker/notary/pulls/195"}}},"pull_request":{"url":"https://api.github.com/repos/docker/notary/pulls/195","id":44730505,"html_url":"https://github.com/docker/notary/pull/195","diff_url":"https://github.com/docker/notary/pull/195.diff","patch_url":"https://github.com/docker/notary/pull/195.patch","issue_url":"https://api.github.com/repos/docker/notary/issues/195","number":195,"state":"open","locked":false,"title":"Make static cross darwin builds work","user":{"login":"jbeda","id":37310,"avatar_url":"https://avatars.githubusercontent.com/u/37310?v=3","gravatar_id":"","url":"https://api.github.com/users/jbeda","html_url":"https://github.com/jbeda","followers_url":"https://api.github.com/users/jbeda/followers","following_url":"https://api.github.com/users/jbeda/following{/other_user}","gists_url":"https://api.github.com/users/jbeda/gists{/gist_id}","starred_url":"https://api.github.com/users/jbeda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbeda/subscriptions","organizations_url":"https://api.github.com/users/jbeda/orgs","repos_url":"https://api.github.com/users/jbeda/repos","events_url":"https://api.github.com/users/jbeda/events{/privacy}","received_events_url":"https://api.github.com/users/jbeda/received_events","type":"User","site_admin":false},"body":"Fixes #194.  Static builds couldn't find homedir on darwin.","created_at":"2015-09-10T23:09:02Z","updated_at":"2015-09-13T04:49:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99fa37a6c3d618f13aa01225dc2c902a6c32b83b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/notary/pulls/195/commits","review_comments_url":"https://api.github.com/repos/docker/notary/pulls/195/comments","review_comment_url":"https://api.github.com/repos/docker/notary/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/notary/issues/195/comments","statuses_url":"https://api.github.com/repos/docker/notary/statuses/f7d0ea70af0547eba18410e9e841dc735243fa43","head":{"label":"jbeda:master","ref":"master","sha":"f7d0ea70af0547eba18410e9e841dc735243fa43","user":{"login":"jbeda","id":37310,"avatar_url":"https://avatars.githubusercontent.com/u/37310?v=3","gravatar_id":"","url":"https://api.github.com/users/jbeda","html_url":"https://github.com/jbeda","followers_url":"https://api.github.com/users/jbeda/followers","following_url":"https://api.github.com/users/jbeda/following{/other_user}","gists_url":"https://api.github.com/users/jbeda/gists{/gist_id}","starred_url":"https://api.github.com/users/jbeda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbeda/subscriptions","organizations_url":"https://api.github.com/users/jbeda/orgs","repos_url":"https://api.github.com/users/jbeda/repos","events_url":"https://api.github.com/users/jbeda/events{/privacy}","received_events_url":"https://api.github.com/users/jbeda/received_events","type":"User","site_admin":false},"repo":{"id":42275387,"name":"notary","full_name":"jbeda/notary","owner":{"login":"jbeda","id":37310,"avatar_url":"https://avatars.githubusercontent.com/u/37310?v=3","gravatar_id":"","url":"https://api.github.com/users/jbeda","html_url":"https://github.com/jbeda","followers_url":"https://api.github.com/users/jbeda/followers","following_url":"https://api.github.com/users/jbeda/following{/other_user}","gists_url":"https://api.github.com/users/jbeda/gists{/gist_id}","starred_url":"https://api.github.com/users/jbeda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbeda/subscriptions","organizations_url":"https://api.github.com/users/jbeda/orgs","repos_url":"https://api.github.com/users/jbeda/repos","events_url":"https://api.github.com/users/jbeda/events{/privacy}","received_events_url":"https://api.github.com/users/jbeda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jbeda/notary","description":"","fork":true,"url":"https://api.github.com/repos/jbeda/notary","forks_url":"https://api.github.com/repos/jbeda/notary/forks","keys_url":"https://api.github.com/repos/jbeda/notary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jbeda/notary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jbeda/notary/teams","hooks_url":"https://api.github.com/repos/jbeda/notary/hooks","issue_events_url":"https://api.github.com/repos/jbeda/notary/issues/events{/number}","events_url":"https://api.github.com/repos/jbeda/notary/events","assignees_url":"https://api.github.com/repos/jbeda/notary/assignees{/user}","branches_url":"https://api.github.com/repos/jbeda/notary/branches{/branch}","tags_url":"https://api.github.com/repos/jbeda/notary/tags","blobs_url":"https://api.github.com/repos/jbeda/notary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jbeda/notary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jbeda/notary/git/refs{/sha}","trees_url":"https://api.github.com/repos/jbeda/notary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jbeda/notary/statuses/{sha}","languages_url":"https://api.github.com/repos/jbeda/notary/languages","stargazers_url":"https://api.github.com/repos/jbeda/notary/stargazers","contributors_url":"https://api.github.com/repos/jbeda/notary/contributors","subscribers_url":"https://api.github.com/repos/jbeda/notary/subscribers","subscription_url":"https://api.github.com/repos/jbeda/notary/subscription","commits_url":"https://api.github.com/repos/jbeda/notary/commits{/sha}","git_commits_url":"https://api.github.com/repos/jbeda/notary/git/commits{/sha}","comments_url":"https://api.github.com/repos/jbeda/notary/comments{/number}","issue_comment_url":"https://api.github.com/repos/jbeda/notary/issues/comments{/number}","contents_url":"https://api.github.com/repos/jbeda/notary/contents/{+path}","compare_url":"https://api.github.com/repos/jbeda/notary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jbeda/notary/merges","archive_url":"https://api.github.com/repos/jbeda/notary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jbeda/notary/downloads","issues_url":"https://api.github.com/repos/jbeda/notary/issues{/number}","pulls_url":"https://api.github.com/repos/jbeda/notary/pulls{/number}","milestones_url":"https://api.github.com/repos/jbeda/notary/milestones{/number}","notifications_url":"https://api.github.com/repos/jbeda/notary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jbeda/notary/labels{/name}","releases_url":"https://api.github.com/repos/jbeda/notary/releases{/id}","created_at":"2015-09-10T23:06:05Z","updated_at":"2015-09-10T23:06:06Z","pushed_at":"2015-09-10T23:07:50Z","git_url":"git://github.com/jbeda/notary.git","ssh_url":"git@github.com:jbeda/notary.git","clone_url":"https://github.com/jbeda/notary.git","svn_url":"https://github.com/jbeda/notary","homepage":null,"size":20866,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"docker:master","ref":"master","sha":"ac05822d7d71ef077df3fc24f506672282a1feea","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":37743436,"name":"notary","full_name":"docker/notary","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/notary","description":"","fork":false,"url":"https://api.github.com/repos/docker/notary","forks_url":"https://api.github.com/repos/docker/notary/forks","keys_url":"https://api.github.com/repos/docker/notary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/notary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/notary/teams","hooks_url":"https://api.github.com/repos/docker/notary/hooks","issue_events_url":"https://api.github.com/repos/docker/notary/issues/events{/number}","events_url":"https://api.github.com/repos/docker/notary/events","assignees_url":"https://api.github.com/repos/docker/notary/assignees{/user}","branches_url":"https://api.github.com/repos/docker/notary/branches{/branch}","tags_url":"https://api.github.com/repos/docker/notary/tags","blobs_url":"https://api.github.com/repos/docker/notary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/notary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/notary/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/notary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/notary/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/notary/languages","stargazers_url":"https://api.github.com/repos/docker/notary/stargazers","contributors_url":"https://api.github.com/repos/docker/notary/contributors","subscribers_url":"https://api.github.com/repos/docker/notary/subscribers","subscription_url":"https://api.github.com/repos/docker/notary/subscription","commits_url":"https://api.github.com/repos/docker/notary/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/notary/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/notary/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/notary/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/notary/contents/{+path}","compare_url":"https://api.github.com/repos/docker/notary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/notary/merges","archive_url":"https://api.github.com/repos/docker/notary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/notary/downloads","issues_url":"https://api.github.com/repos/docker/notary/issues{/number}","pulls_url":"https://api.github.com/repos/docker/notary/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/notary/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/notary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/notary/labels{/name}","releases_url":"https://api.github.com/repos/docker/notary/releases{/id}","created_at":"2015-06-19T20:07:53Z","updated_at":"2015-09-13T02:31:10Z","pushed_at":"2015-09-10T23:09:03Z","git_url":"git://github.com/docker/notary.git","ssh_url":"git@github.com:docker/notary.git","clone_url":"https://github.com/docker/notary.git","svn_url":"https://github.com/docker/notary","homepage":null,"size":22264,"stargazers_count":385,"watchers_count":385,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":25,"forks":37,"open_issues":25,"watchers":385,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/notary/pulls/195"},"html":{"href":"https://github.com/docker/notary/pull/195"},"issue":{"href":"https://api.github.com/repos/docker/notary/issues/195"},"comments":{"href":"https://api.github.com/repos/docker/notary/issues/195/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/notary/pulls/195/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/notary/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/notary/pulls/195/commits"},"statuses":{"href":"https://api.github.com/repos/docker/notary/statuses/f7d0ea70af0547eba18410e9e841dc735243fa43"}}}}