{"action":"opened","number":725,"pull_request":{"url":"https://api.github.com/repos/yarnpkg/yarn/pulls/725","id":88903021,"html_url":"https://github.com/yarnpkg/yarn/pull/725","diff_url":"https://github.com/yarnpkg/yarn/pull/725.diff","patch_url":"https://github.com/yarnpkg/yarn/pull/725.patch","issue_url":"https://api.github.com/repos/yarnpkg/yarn/issues/725","number":725,"state":"open","locked":false,"title":"Typo in hostname check inside isPossibleOfflineError()","user":{"login":"pi0","id":5158436,"avatar_url":"https://avatars.githubusercontent.com/u/5158436?v=3","gravatar_id":"","url":"https://api.github.com/users/pi0","html_url":"https://github.com/pi0","followers_url":"https://api.github.com/users/pi0/followers","following_url":"https://api.github.com/users/pi0/following{/other_user}","gists_url":"https://api.github.com/users/pi0/gists{/gist_id}","starred_url":"https://api.github.com/users/pi0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pi0/subscriptions","organizations_url":"https://api.github.com/users/pi0/orgs","repos_url":"https://api.github.com/users/pi0/repos","events_url":"https://api.github.com/users/pi0/events{/privacy}","received_events_url":"https://api.github.com/users/pi0/received_events","type":"User","site_admin":false},"body":"**Summary**\r\n`hostname` is not always available on network `error` objects when checking that object inside `lib/util.js:isPossibleOfflineError()` function this will always `return false;` so **INSTALL BREAKS ON ANY TYPE OF ERROR** and doesn't attempts to retry and recover from that network error.\r\n\r\n**Solution**\r\nSimply we can have a better check on `hostname` field by ensuring it is actually `null` (using `===` operator) but not  `undefined` (`==` operator implies both `null` and *unwanted* `undefined` contidions)\r\n\r\n**Test plan**\r\nHowever this is obviously implementation typo but we can try to install packages with following conditions:\r\n\r\n- Windows 10 Machine \r\n- No packages cache available\r\n- Throwing `ECONNRESET` connection error during Installation\r\n- Result: install breaks with no attempt to retry\r\n","created_at":"2016-10-11T20:17:16Z","updated_at":"2016-10-11T20:17:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/yarnpkg/yarn/pulls/725/commits","review_comments_url":"https://api.github.com/repos/yarnpkg/yarn/pulls/725/comments","review_comment_url":"https://api.github.com/repos/yarnpkg/yarn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yarnpkg/yarn/issues/725/comments","statuses_url":"https://api.github.com/repos/yarnpkg/yarn/statuses/5cf19d3c34479178cefe2b27a03f3402b5be3ffd","head":{"label":"pi0:fix","ref":"fix","sha":"5cf19d3c34479178cefe2b27a03f3402b5be3ffd","user":{"login":"pi0","id":5158436,"avatar_url":"https://avatars.githubusercontent.com/u/5158436?v=3","gravatar_id":"","url":"https://api.github.com/users/pi0","html_url":"https://github.com/pi0","followers_url":"https://api.github.com/users/pi0/followers","following_url":"https://api.github.com/users/pi0/following{/other_user}","gists_url":"https://api.github.com/users/pi0/gists{/gist_id}","starred_url":"https://api.github.com/users/pi0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pi0/subscriptions","organizations_url":"https://api.github.com/users/pi0/orgs","repos_url":"https://api.github.com/users/pi0/repos","events_url":"https://api.github.com/users/pi0/events{/privacy}","received_events_url":"https://api.github.com/users/pi0/received_events","type":"User","site_admin":false},"repo":{"id":70630771,"name":"yarn","full_name":"pi0/yarn","owner":{"login":"pi0","id":5158436,"avatar_url":"https://avatars.githubusercontent.com/u/5158436?v=3","gravatar_id":"","url":"https://api.github.com/users/pi0","html_url":"https://github.com/pi0","followers_url":"https://api.github.com/users/pi0/followers","following_url":"https://api.github.com/users/pi0/following{/other_user}","gists_url":"https://api.github.com/users/pi0/gists{/gist_id}","starred_url":"https://api.github.com/users/pi0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pi0/subscriptions","organizations_url":"https://api.github.com/users/pi0/orgs","repos_url":"https://api.github.com/users/pi0/repos","events_url":"https://api.github.com/users/pi0/events{/privacy}","received_events_url":"https://api.github.com/users/pi0/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pi0/yarn","description":"📦🐈 Fast, reliable, and secure dependency management for JavaScript.","fork":true,"url":"https://api.github.com/repos/pi0/yarn","forks_url":"https://api.github.com/repos/pi0/yarn/forks","keys_url":"https://api.github.com/repos/pi0/yarn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pi0/yarn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pi0/yarn/teams","hooks_url":"https://api.github.com/repos/pi0/yarn/hooks","issue_events_url":"https://api.github.com/repos/pi0/yarn/issues/events{/number}","events_url":"https://api.github.com/repos/pi0/yarn/events","assignees_url":"https://api.github.com/repos/pi0/yarn/assignees{/user}","branches_url":"https://api.github.com/repos/pi0/yarn/branches{/branch}","tags_url":"https://api.github.com/repos/pi0/yarn/tags","blobs_url":"https://api.github.com/repos/pi0/yarn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pi0/yarn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pi0/yarn/git/refs{/sha}","trees_url":"https://api.github.com/repos/pi0/yarn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pi0/yarn/statuses/{sha}","languages_url":"https://api.github.com/repos/pi0/yarn/languages","stargazers_url":"https://api.github.com/repos/pi0/yarn/stargazers","contributors_url":"https://api.github.com/repos/pi0/yarn/contributors","subscribers_url":"https://api.github.com/repos/pi0/yarn/subscribers","subscription_url":"https://api.github.com/repos/pi0/yarn/subscription","commits_url":"https://api.github.com/repos/pi0/yarn/commits{/sha}","git_commits_url":"https://api.github.com/repos/pi0/yarn/git/commits{/sha}","comments_url":"https://api.github.com/repos/pi0/yarn/comments{/number}","issue_comment_url":"https://api.github.com/repos/pi0/yarn/issues/comments{/number}","contents_url":"https://api.github.com/repos/pi0/yarn/contents/{+path}","compare_url":"https://api.github.com/repos/pi0/yarn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pi0/yarn/merges","archive_url":"https://api.github.com/repos/pi0/yarn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pi0/yarn/downloads","issues_url":"https://api.github.com/repos/pi0/yarn/issues{/number}","pulls_url":"https://api.github.com/repos/pi0/yarn/pulls{/number}","milestones_url":"https://api.github.com/repos/pi0/yarn/milestones{/number}","notifications_url":"https://api.github.com/repos/pi0/yarn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pi0/yarn/labels{/name}","releases_url":"https://api.github.com/repos/pi0/yarn/releases{/id}","deployments_url":"https://api.github.com/repos/pi0/yarn/deployments","created_at":"2016-10-11T20:04:40Z","updated_at":"2016-10-11T20:04:55Z","pushed_at":"2016-10-11T20:06:47Z","git_url":"git://github.com/pi0/yarn.git","ssh_url":"git@github.com:pi0/yarn.git","clone_url":"https://github.com/pi0/yarn.git","svn_url":"https://github.com/pi0/yarn","homepage":"https://yarnpkg.com","size":35169,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"yarnpkg:master","ref":"master","sha":"c727449254b77b03a43770f0807511c424abfb94","user":{"login":"yarnpkg","id":22247014,"avatar_url":"https://avatars.githubusercontent.com/u/22247014?v=3","gravatar_id":"","url":"https://api.github.com/users/yarnpkg","html_url":"https://github.com/yarnpkg","followers_url":"https://api.github.com/users/yarnpkg/followers","following_url":"https://api.github.com/users/yarnpkg/following{/other_user}","gists_url":"https://api.github.com/users/yarnpkg/gists{/gist_id}","starred_url":"https://api.github.com/users/yarnpkg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarnpkg/subscriptions","organizations_url":"https://api.github.com/users/yarnpkg/orgs","repos_url":"https://api.github.com/users/yarnpkg/repos","events_url":"https://api.github.com/users/yarnpkg/events{/privacy}","received_events_url":"https://api.github.com/users/yarnpkg/received_events","type":"Organization","site_admin":false},"repo":{"id":49970642,"name":"yarn","full_name":"yarnpkg/yarn","owner":{"login":"yarnpkg","id":22247014,"avatar_url":"https://avatars.githubusercontent.com/u/22247014?v=3","gravatar_id":"","url":"https://api.github.com/users/yarnpkg","html_url":"https://github.com/yarnpkg","followers_url":"https://api.github.com/users/yarnpkg/followers","following_url":"https://api.github.com/users/yarnpkg/following{/other_user}","gists_url":"https://api.github.com/users/yarnpkg/gists{/gist_id}","starred_url":"https://api.github.com/users/yarnpkg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarnpkg/subscriptions","organizations_url":"https://api.github.com/users/yarnpkg/orgs","repos_url":"https://api.github.com/users/yarnpkg/repos","events_url":"https://api.github.com/users/yarnpkg/events{/privacy}","received_events_url":"https://api.github.com/users/yarnpkg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yarnpkg/yarn","description":"📦🐈 Fast, reliable, and secure dependency management for JavaScript.","fork":false,"url":"https://api.github.com/repos/yarnpkg/yarn","forks_url":"https://api.github.com/repos/yarnpkg/yarn/forks","keys_url":"https://api.github.com/repos/yarnpkg/yarn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yarnpkg/yarn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yarnpkg/yarn/teams","hooks_url":"https://api.github.com/repos/yarnpkg/yarn/hooks","issue_events_url":"https://api.github.com/repos/yarnpkg/yarn/issues/events{/number}","events_url":"https://api.github.com/repos/yarnpkg/yarn/events","assignees_url":"https://api.github.com/repos/yarnpkg/yarn/assignees{/user}","branches_url":"https://api.github.com/repos/yarnpkg/yarn/branches{/branch}","tags_url":"https://api.github.com/repos/yarnpkg/yarn/tags","blobs_url":"https://api.github.com/repos/yarnpkg/yarn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yarnpkg/yarn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yarnpkg/yarn/git/refs{/sha}","trees_url":"https://api.github.com/repos/yarnpkg/yarn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yarnpkg/yarn/statuses/{sha}","languages_url":"https://api.github.com/repos/yarnpkg/yarn/languages","stargazers_url":"https://api.github.com/repos/yarnpkg/yarn/stargazers","contributors_url":"https://api.github.com/repos/yarnpkg/yarn/contributors","subscribers_url":"https://api.github.com/repos/yarnpkg/yarn/subscribers","subscription_url":"https://api.github.com/repos/yarnpkg/yarn/subscription","commits_url":"https://api.github.com/repos/yarnpkg/yarn/commits{/sha}","git_commits_url":"https://api.github.com/repos/yarnpkg/yarn/git/commits{/sha}","comments_url":"https://api.github.com/repos/yarnpkg/yarn/comments{/number}","issue_comment_url":"https://api.github.com/repos/yarnpkg/yarn/issues/comments{/number}","contents_url":"https://api.github.com/repos/yarnpkg/yarn/contents/{+path}","compare_url":"https://api.github.com/repos/yarnpkg/yarn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yarnpkg/yarn/merges","archive_url":"https://api.github.com/repos/yarnpkg/yarn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yarnpkg/yarn/downloads","issues_url":"https://api.github.com/repos/yarnpkg/yarn/issues{/number}","pulls_url":"https://api.github.com/repos/yarnpkg/yarn/pulls{/number}","milestones_url":"https://api.github.com/repos/yarnpkg/yarn/milestones{/number}","notifications_url":"https://api.github.com/repos/yarnpkg/yarn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yarnpkg/yarn/labels{/name}","releases_url":"https://api.github.com/repos/yarnpkg/yarn/releases{/id}","deployments_url":"https://api.github.com/repos/yarnpkg/yarn/deployments","created_at":"2016-01-19T17:39:16Z","updated_at":"2016-10-11T20:17:10Z","pushed_at":"2016-10-11T20:13:55Z","git_url":"git://github.com/yarnpkg/yarn.git","ssh_url":"git@github.com:yarnpkg/yarn.git","clone_url":"https://github.com/yarnpkg/yarn.git","svn_url":"https://github.com/yarnpkg/yarn","homepage":"https://yarnpkg.com","size":35188,"stargazers_count":3646,"watchers_count":3646,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":67,"mirror_url":null,"open_issues_count":126,"forks":67,"open_issues":126,"watchers":3646,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/725"},"html":{"href":"https://github.com/yarnpkg/yarn/pull/725"},"issue":{"href":"https://api.github.com/repos/yarnpkg/yarn/issues/725"},"comments":{"href":"https://api.github.com/repos/yarnpkg/yarn/issues/725/comments"},"review_comments":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/725/comments"},"review_comment":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/725/commits"},"statuses":{"href":"https://api.github.com/repos/yarnpkg/yarn/statuses/5cf19d3c34479178cefe2b27a03f3402b5be3ffd"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"pi0"}}