{"action":"created","comment":{"url":"https://api.github.com/repos/yarnpkg/yarn/pulls/comments/84949891","pull_request_review_id":5693215,"id":84949891,"diff_hunk":"@@ -69,6 +76,43 @@ type Flags = {\n   tilde: boolean,\n };\n \n+/**\n+ * Try and detect the installation method for Yarn and provide a command to update it with.\n+ */\n+\n+function getUpdateCommand(): ?string {\n+  // Tarball install\n+  if (fs2.existsSync(path.join(userHome, '.yarn'))) {\n+    return 'yarn self-update';\n+  }\n+\n+  // OSX\n+  if (fs2.existsSync('/usr/local/Cellar')) {\n+    return 'brew upgrade yarn';\n+  }\n+\n+  // Debian\n+  if (fs2.existsSync('/usr/share/lintian/overrides/yarn')) {\n+    return 'sudo apt-get install yarn';\n+  }\n+\n+  // npm\n+  if (__dirname.indexOf('node_modules') >= 0) {\n+    return 'npm upgrade --global yarn';\n+  }\n+\n+  return null;\n+}\n+\n+function getUpdateInstaller(): ?string {\n+  // Windows\n+  if (fs2.existsSync('C:/Program Files/Yarn') || fs2.existsSync('C:/Program Files (x86)/Yarn')) {","path":"src/cli/commands/install.js","position":50,"original_position":50,"commit_id":"e864da941fdac9414cf4b0353de53d1b68fb85f2","original_commit_id":"e864da941fdac9414cf4b0353de53d1b68fb85f2","user":{"login":"Daniel15","id":91933,"avatar_url":"https://avatars.githubusercontent.com/u/91933?v=3","gravatar_id":"","url":"https://api.github.com/users/Daniel15","html_url":"https://github.com/Daniel15","followers_url":"https://api.github.com/users/Daniel15/followers","following_url":"https://api.github.com/users/Daniel15/following{/other_user}","gists_url":"https://api.github.com/users/Daniel15/gists{/gist_id}","starred_url":"https://api.github.com/users/Daniel15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Daniel15/subscriptions","organizations_url":"https://api.github.com/users/Daniel15/orgs","repos_url":"https://api.github.com/users/Daniel15/repos","events_url":"https://api.github.com/users/Daniel15/events{/privacy}","received_events_url":"https://api.github.com/users/Daniel15/received_events","type":"User","site_admin":false},"body":"This won't work as the user can select any directory during installation. Using the environment variable (`%ProgramFiles%\\Yarn`) is better, but still not 100% accurate. Modifying `package.json` to have `\"installationMethod\": \"msi\"` as part of the build process would work best.","created_at":"2016-10-25T16:57:28Z","updated_at":"2016-10-25T16:59:24Z","html_url":"https://github.com/yarnpkg/yarn/pull/1429#discussion_r84949891","pull_request_url":"https://api.github.com/repos/yarnpkg/yarn/pulls/1429","_links":{"self":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/comments/84949891"},"html":{"href":"https://github.com/yarnpkg/yarn/pull/1429#discussion_r84949891"},"pull_request":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/1429"}}},"pull_request":{"url":"https://api.github.com/repos/yarnpkg/yarn/pulls/1429","id":90781688,"html_url":"https://github.com/yarnpkg/yarn/pull/1429","diff_url":"https://github.com/yarnpkg/yarn/pull/1429.diff","patch_url":"https://github.com/yarnpkg/yarn/pull/1429.patch","issue_url":"https://api.github.com/repos/yarnpkg/yarn/issues/1429","number":1429,"state":"open","locked":false,"title":"Add automatic check for updates that nags the user when there's a new version available","user":{"login":"kittens","id":853712,"avatar_url":"https://avatars.githubusercontent.com/u/853712?v=3","gravatar_id":"","url":"https://api.github.com/users/kittens","html_url":"https://github.com/kittens","followers_url":"https://api.github.com/users/kittens/followers","following_url":"https://api.github.com/users/kittens/following{/other_user}","gists_url":"https://api.github.com/users/kittens/gists{/gist_id}","starred_url":"https://api.github.com/users/kittens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kittens/subscriptions","organizations_url":"https://api.github.com/users/kittens/orgs","repos_url":"https://api.github.com/users/kittens/repos","events_url":"https://api.github.com/users/kittens/events{/privacy}","received_events_url":"https://api.github.com/users/kittens/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-10-25T10:40:05Z","updated_at":"2016-10-25T16:59:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d48c1555888efceb19519f780443a27f9cc3b7a0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/yarnpkg/yarn/pulls/1429/commits","review_comments_url":"https://api.github.com/repos/yarnpkg/yarn/pulls/1429/comments","review_comment_url":"https://api.github.com/repos/yarnpkg/yarn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yarnpkg/yarn/issues/1429/comments","statuses_url":"https://api.github.com/repos/yarnpkg/yarn/statuses/e864da941fdac9414cf4b0353de53d1b68fb85f2","head":{"label":"yarnpkg:update-check","ref":"update-check","sha":"e864da941fdac9414cf4b0353de53d1b68fb85f2","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.","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-25T16:48:39Z","pushed_at":"2016-10-25T15:47:08Z","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":51633,"stargazers_count":17221,"watchers_count":17221,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":513,"mirror_url":null,"open_issues_count":391,"forks":513,"open_issues":391,"watchers":17221,"default_branch":"master"}},"base":{"label":"yarnpkg:master","ref":"master","sha":"2ef2e5edeed090814e890b91ae9c1217730ce164","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.","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-25T16:48:39Z","pushed_at":"2016-10-25T15:47:08Z","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":51633,"stargazers_count":17221,"watchers_count":17221,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":513,"mirror_url":null,"open_issues_count":391,"forks":513,"open_issues":391,"watchers":17221,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/1429"},"html":{"href":"https://github.com/yarnpkg/yarn/pull/1429"},"issue":{"href":"https://api.github.com/repos/yarnpkg/yarn/issues/1429"},"comments":{"href":"https://api.github.com/repos/yarnpkg/yarn/issues/1429/comments"},"review_comments":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/1429/comments"},"review_comment":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/1429/commits"},"statuses":{"href":"https://api.github.com/repos/yarnpkg/yarn/statuses/e864da941fdac9414cf4b0353de53d1b68fb85f2"}}}}
{"actor":{"display_login":"Daniel15"}}