{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes-sigs/krew/pulls/comments/305567616","pull_request_review_id":264483609,"id":305567616,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwNTU2NzYxNg==","diff_hunk":"@@ -113,18 +112,22 @@ func install(plugin, version, uri, bin string, p environment.Paths, fos []index.\n // Uninstall will uninstall a plugin.\n func Uninstall(p environment.Paths, name string) error {\n \tif name == krewPluginName {\n-\t\treturn errors.Errorf(\"removing krew is not allowed through krew. Please run:\\n\\t rm -r %s\", p.BasePath())\n+\t\tglog.Errorf(\"Removing krew through krew is not supported.\")\n+\t\tif !isWindows() { // assume POSIX-like\n+\t\t\tglog.Errorf(\"If you’d like to uninstall krew altogether, run:\\n\\trm -rf -- %q\", p.BasePath())\n+\t\t}\n+\t\treturn errors.New(\"self-uninstall not allowed\")\n \t}\n \tglog.V(3).Infof(\"Finding installed version to delete\")\n-\tversion, installed, err := findInstalledPluginVersion(p.InstallPath(), p.BinPath(), name)\n-\tif err != nil {\n-\t\treturn errors.Wrap(err, \"can't uninstall plugin\")\n-\t}\n-\tif !installed {\n-\t\treturn ErrIsNotInstalled\n+\n+\tif _, err := receipt.Load(p.PluginInstallReceiptPath(name)); err != nil {","path":"pkg/installation/install.go","position":79,"original_position":79,"commit_id":"aac4bb3d325804ed34b97cf262bed076c508c514","original_commit_id":"aac4bb3d325804ed34b97cf262bed076c508c514","user":{"login":"ahmetb","id":159209,"node_id":"MDQ6VXNlcjE1OTIwOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/159209?v=4","gravatar_id":"","url":"https://api.github.com/users/ahmetb","html_url":"https://github.com/ahmetb","followers_url":"https://api.github.com/users/ahmetb/followers","following_url":"https://api.github.com/users/ahmetb/following{/other_user}","gists_url":"https://api.github.com/users/ahmetb/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmetb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmetb/subscriptions","organizations_url":"https://api.github.com/users/ahmetb/orgs","repos_url":"https://api.github.com/users/ahmetb/repos","events_url":"https://api.github.com/users/ahmetb/events{/privacy}","received_events_url":"https://api.github.com/users/ahmetb/received_events","type":"User","site_admin":false},"body":"I'm inclined to keep this as is. If receipt cannot be parsed during uninstallation, that points to a problem and we should probably stop.\r\n\r\nIn the future we might introduce a field like `status.originIndex` (or like `status.installPath`) to determine the installation path. So we'll actually need to use the receipt, soon.","created_at":"2019-07-20T04:50:11Z","updated_at":"2019-07-20T04:50:11Z","html_url":"https://github.com/kubernetes-sigs/krew/pull/278#discussion_r305567616","pull_request_url":"https://api.github.com/repos/kubernetes-sigs/krew/pulls/278","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kubernetes-sigs/krew/pulls/comments/305567616"},"html":{"href":"https://github.com/kubernetes-sigs/krew/pull/278#discussion_r305567616"},"pull_request":{"href":"https://api.github.com/repos/kubernetes-sigs/krew/pulls/278"}},"in_reply_to_id":305530582},"pull_request":{"url":"https://api.github.com/repos/kubernetes-sigs/krew/pulls/278","id":299080889,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk5MDgwODg5","html_url":"https://github.com/kubernetes-sigs/krew/pull/278","diff_url":"https://github.com/kubernetes-sigs/krew/pull/278.diff","patch_url":"https://github.com/kubernetes-sigs/krew/pull/278.patch","issue_url":"https://api.github.com/repos/kubernetes-sigs/krew/issues/278","number":278,"state":"open","locked":false,"title":"Refactor upgrade machinery to use semver versions","user":{"login":"ahmetb","id":159209,"node_id":"MDQ6VXNlcjE1OTIwOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/159209?v=4","gravatar_id":"","url":"https://api.github.com/users/ahmetb","html_url":"https://github.com/ahmetb","followers_url":"https://api.github.com/users/ahmetb/followers","following_url":"https://api.github.com/users/ahmetb/following{/other_user}","gists_url":"https://api.github.com/users/ahmetb/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmetb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmetb/subscriptions","organizations_url":"https://api.github.com/users/ahmetb/orgs","repos_url":"https://api.github.com/users/ahmetb/repos","events_url":"https://api.github.com/users/ahmetb/events{/privacy}","received_events_url":"https://api.github.com/users/ahmetb/received_events","type":"User","site_admin":false},"body":"This change starts using semver version of plugin manifests to:\r\n- determine if upgrade is needed\r\n- determine if a plugin is installed\r\n\r\nby looking at receipts installation directory. It doesn't help with other commands just yet.\r\n\r\nThis fixes #166, and helps with #277 partially.\r\n\r\nOther commands are probably not yet using receipts entirely.","created_at":"2019-07-18T20:33:34Z","updated_at":"2019-07-20T04:50:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"580091e5ac917c4749ace57377a12f72fad68cfa","assignee":null,"assignees":[],"requested_reviewers":[{"login":"juanvallejo","id":3902875,"node_id":"MDQ6VXNlcjM5MDI4NzU=","avatar_url":"https://avatars2.githubusercontent.com/u/3902875?v=4","gravatar_id":"","url":"https://api.github.com/users/juanvallejo","html_url":"https://github.com/juanvallejo","followers_url":"https://api.github.com/users/juanvallejo/followers","following_url":"https://api.github.com/users/juanvallejo/following{/other_user}","gists_url":"https://api.github.com/users/juanvallejo/gists{/gist_id}","starred_url":"https://api.github.com/users/juanvallejo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanvallejo/subscriptions","organizations_url":"https://api.github.com/users/juanvallejo/orgs","repos_url":"https://api.github.com/users/juanvallejo/repos","events_url":"https://api.github.com/users/juanvallejo/events{/privacy}","received_events_url":"https://api.github.com/users/juanvallejo/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1299300775,"node_id":"MDU6TGFiZWwxMjk5MzAwNzc1","url":"https://api.github.com/repos/kubernetes-sigs/krew/labels/approved","name":"approved","color":"0ffa16","default":false},{"id":1299300758,"node_id":"MDU6TGFiZWwxMjk5MzAwNzU4","url":"https://api.github.com/repos/kubernetes-sigs/krew/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":1299300722,"node_id":"MDU6TGFiZWwxMjk5MzAwNzIy","url":"https://api.github.com/repos/kubernetes-sigs/krew/labels/size/L","name":"size/L","color":"ee9900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes-sigs/krew/pulls/278/commits","review_comments_url":"https://api.github.com/repos/kubernetes-sigs/krew/pulls/278/comments","review_comment_url":"https://api.github.com/repos/kubernetes-sigs/krew/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes-sigs/krew/issues/278/comments","statuses_url":"https://api.github.com/repos/kubernetes-sigs/krew/statuses/aac4bb3d325804ed34b97cf262bed076c508c514","head":{"label":"ahmetb:semver-upgrades","ref":"semver-upgrades","sha":"aac4bb3d325804ed34b97cf262bed076c508c514","user":{"login":"ahmetb","id":159209,"node_id":"MDQ6VXNlcjE1OTIwOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/159209?v=4","gravatar_id":"","url":"https://api.github.com/users/ahmetb","html_url":"https://github.com/ahmetb","followers_url":"https://api.github.com/users/ahmetb/followers","following_url":"https://api.github.com/users/ahmetb/following{/other_user}","gists_url":"https://api.github.com/users/ahmetb/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmetb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmetb/subscriptions","organizations_url":"https://api.github.com/users/ahmetb/orgs","repos_url":"https://api.github.com/users/ahmetb/repos","events_url":"https://api.github.com/users/ahmetb/events{/privacy}","received_events_url":"https://api.github.com/users/ahmetb/received_events","type":"User","site_admin":false},"repo":{"id":142930446,"node_id":"MDEwOlJlcG9zaXRvcnkxNDI5MzA0NDY=","name":"krew","full_name":"ahmetb/krew","private":false,"owner":{"login":"ahmetb","id":159209,"node_id":"MDQ6VXNlcjE1OTIwOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/159209?v=4","gravatar_id":"","url":"https://api.github.com/users/ahmetb","html_url":"https://github.com/ahmetb","followers_url":"https://api.github.com/users/ahmetb/followers","following_url":"https://api.github.com/users/ahmetb/following{/other_user}","gists_url":"https://api.github.com/users/ahmetb/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmetb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmetb/subscriptions","organizations_url":"https://api.github.com/users/ahmetb/orgs","repos_url":"https://api.github.com/users/ahmetb/repos","events_url":"https://api.github.com/users/ahmetb/events{/privacy}","received_events_url":"https://api.github.com/users/ahmetb/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ahmetb/krew","description":"📦 Package manager for kubectl plugins","fork":true,"url":"https://api.github.com/repos/ahmetb/krew","forks_url":"https://api.github.com/repos/ahmetb/krew/forks","keys_url":"https://api.github.com/repos/ahmetb/krew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ahmetb/krew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ahmetb/krew/teams","hooks_url":"https://api.github.com/repos/ahmetb/krew/hooks","issue_events_url":"https://api.github.com/repos/ahmetb/krew/issues/events{/number}","events_url":"https://api.github.com/repos/ahmetb/krew/events","assignees_url":"https://api.github.com/repos/ahmetb/krew/assignees{/user}","branches_url":"https://api.github.com/repos/ahmetb/krew/branches{/branch}","tags_url":"https://api.github.com/repos/ahmetb/krew/tags","blobs_url":"https://api.github.com/repos/ahmetb/krew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ahmetb/krew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ahmetb/krew/git/refs{/sha}","trees_url":"https://api.github.com/repos/ahmetb/krew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ahmetb/krew/statuses/{sha}","languages_url":"https://api.github.com/repos/ahmetb/krew/languages","stargazers_url":"https://api.github.com/repos/ahmetb/krew/stargazers","contributors_url":"https://api.github.com/repos/ahmetb/krew/contributors","subscribers_url":"https://api.github.com/repos/ahmetb/krew/subscribers","subscription_url":"https://api.github.com/repos/ahmetb/krew/subscription","commits_url":"https://api.github.com/repos/ahmetb/krew/commits{/sha}","git_commits_url":"https://api.github.com/repos/ahmetb/krew/git/commits{/sha}","comments_url":"https://api.github.com/repos/ahmetb/krew/comments{/number}","issue_comment_url":"https://api.github.com/repos/ahmetb/krew/issues/comments{/number}","contents_url":"https://api.github.com/repos/ahmetb/krew/contents/{+path}","compare_url":"https://api.github.com/repos/ahmetb/krew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ahmetb/krew/merges","archive_url":"https://api.github.com/repos/ahmetb/krew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ahmetb/krew/downloads","issues_url":"https://api.github.com/repos/ahmetb/krew/issues{/number}","pulls_url":"https://api.github.com/repos/ahmetb/krew/pulls{/number}","milestones_url":"https://api.github.com/repos/ahmetb/krew/milestones{/number}","notifications_url":"https://api.github.com/repos/ahmetb/krew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ahmetb/krew/labels{/name}","releases_url":"https://api.github.com/repos/ahmetb/krew/releases{/id}","deployments_url":"https://api.github.com/repos/ahmetb/krew/deployments","created_at":"2018-07-30T21:32:55Z","updated_at":"2019-05-21T02:26:27Z","pushed_at":"2019-07-18T21:57:10Z","git_url":"git://github.com/ahmetb/krew.git","ssh_url":"git@github.com:ahmetb/krew.git","clone_url":"https://github.com/ahmetb/krew.git","svn_url":"https://github.com/ahmetb/krew","homepage":"","size":4116,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"kubernetes-sigs:master","ref":"master","sha":"5969272c23bcd5c1327da8514598b04538478ced","user":{"login":"kubernetes-sigs","id":36015203,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MDE1MjAz","avatar_url":"https://avatars1.githubusercontent.com/u/36015203?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes-sigs","html_url":"https://github.com/kubernetes-sigs","followers_url":"https://api.github.com/users/kubernetes-sigs/followers","following_url":"https://api.github.com/users/kubernetes-sigs/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes-sigs/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes-sigs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes-sigs/subscriptions","organizations_url":"https://api.github.com/users/kubernetes-sigs/orgs","repos_url":"https://api.github.com/users/kubernetes-sigs/repos","events_url":"https://api.github.com/users/kubernetes-sigs/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes-sigs/received_events","type":"Organization","site_admin":false},"repo":{"id":140747457,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA3NDc0NTc=","name":"krew","full_name":"kubernetes-sigs/krew","private":false,"owner":{"login":"kubernetes-sigs","id":36015203,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MDE1MjAz","avatar_url":"https://avatars1.githubusercontent.com/u/36015203?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes-sigs","html_url":"https://github.com/kubernetes-sigs","followers_url":"https://api.github.com/users/kubernetes-sigs/followers","following_url":"https://api.github.com/users/kubernetes-sigs/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes-sigs/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes-sigs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes-sigs/subscriptions","organizations_url":"https://api.github.com/users/kubernetes-sigs/orgs","repos_url":"https://api.github.com/users/kubernetes-sigs/repos","events_url":"https://api.github.com/users/kubernetes-sigs/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes-sigs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/kubernetes-sigs/krew","description":"📦 Package manager for kubectl plugins","fork":false,"url":"https://api.github.com/repos/kubernetes-sigs/krew","forks_url":"https://api.github.com/repos/kubernetes-sigs/krew/forks","keys_url":"https://api.github.com/repos/kubernetes-sigs/krew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes-sigs/krew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes-sigs/krew/teams","hooks_url":"https://api.github.com/repos/kubernetes-sigs/krew/hooks","issue_events_url":"https://api.github.com/repos/kubernetes-sigs/krew/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes-sigs/krew/events","assignees_url":"https://api.github.com/repos/kubernetes-sigs/krew/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes-sigs/krew/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes-sigs/krew/tags","blobs_url":"https://api.github.com/repos/kubernetes-sigs/krew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes-sigs/krew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes-sigs/krew/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes-sigs/krew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes-sigs/krew/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes-sigs/krew/languages","stargazers_url":"https://api.github.com/repos/kubernetes-sigs/krew/stargazers","contributors_url":"https://api.github.com/repos/kubernetes-sigs/krew/contributors","subscribers_url":"https://api.github.com/repos/kubernetes-sigs/krew/subscribers","subscription_url":"https://api.github.com/repos/kubernetes-sigs/krew/subscription","commits_url":"https://api.github.com/repos/kubernetes-sigs/krew/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes-sigs/krew/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes-sigs/krew/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes-sigs/krew/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes-sigs/krew/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes-sigs/krew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes-sigs/krew/merges","archive_url":"https://api.github.com/repos/kubernetes-sigs/krew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes-sigs/krew/downloads","issues_url":"https://api.github.com/repos/kubernetes-sigs/krew/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes-sigs/krew/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes-sigs/krew/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes-sigs/krew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes-sigs/krew/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes-sigs/krew/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes-sigs/krew/deployments","created_at":"2018-07-12T17:56:21Z","updated_at":"2019-07-19T23:42:13Z","pushed_at":"2019-07-18T21:57:56Z","git_url":"git://github.com/kubernetes-sigs/krew.git","ssh_url":"git@github.com:kubernetes-sigs/krew.git","clone_url":"https://github.com/kubernetes-sigs/krew.git","svn_url":"https://github.com/kubernetes-sigs/krew","homepage":"https://krew.dev","size":3727,"stargazers_count":1133,"watchers_count":1133,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":72,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":26,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":72,"open_issues":26,"watchers":1133,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes-sigs/krew/pulls/278"},"html":{"href":"https://github.com/kubernetes-sigs/krew/pull/278"},"issue":{"href":"https://api.github.com/repos/kubernetes-sigs/krew/issues/278"},"comments":{"href":"https://api.github.com/repos/kubernetes-sigs/krew/issues/278/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes-sigs/krew/pulls/278/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes-sigs/krew/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes-sigs/krew/pulls/278/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes-sigs/krew/statuses/aac4bb3d325804ed34b97cf262bed076c508c514"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ahmetb"}}