{"action":"created","comment":{"url":"https://api.github.com/repos/conda/conda/pulls/comments/174797540","pull_request_review_id":104219471,"id":174797540,"diff_hunk":"@@ -23,21 +24,31 @@ class Activator(object):\n     #   2. Execute/source activate.d/deactivate.d scripts\n     #   3. Update the command prompt\n     #\n-    # Shells should also use 'reactivate' following conda's install, update, and\n-    #   remove/uninstall commands.\n+    # Shells should also use 'reactivate' following conda's install, update,\n+    # and remove/uninstall commands.\n     #\n-    # All core logic is in build_activate() or build_deactivate(), and is independent of\n-    # shell type.  Each returns a map containing the keys:\n-    #   export_vars\n-    #   unset_var\n-    #   activate_scripts\n-    #   deactivate_scripts\n+    # All core logic is in the build_*() functions:\n+    #   - build_activate()\n+    #   - build_deactivate()\n+    #   - build_deactivatepost()\n+    #   - build_reactivate()\n+    #   - build_reactivatepost()\n+    # and is independent of shell type.  Each returns a map optionally\n+    # containing the keys:\n+    #   set_vars            (dict of key-values to set)\n+    #   export_vars         (dict of key-values to export)\n+    #   unset_vars          (tuple of keys to unset)\n+    #   unexport_vars       (tuple of keys to un-export)\n+    #   activate_scripts    (tuple of activate scripts)\n+    #   deactivate_scripts  (tuple of deactivate scripts)\n+    #   deactivatepost      (bool to include deactivate post command)\n+    #   reactivatepost      (bool to include reactivate post command)\n     #\n-    # The value of the CONDA_PROMPT_MODIFIER environment variable holds conda's contribution","path":"conda/activate.py","position":40,"original_position":40,"commit_id":"f015e329ac8e55ca30c6424de6cfd9a3b9f5c89d","original_commit_id":"f015e329ac8e55ca30c6424de6cfd9a3b9f5c89d","user":{"login":"njalerikson","id":4546435,"avatar_url":"https://avatars3.githubusercontent.com/u/4546435?v=4","gravatar_id":"","url":"https://api.github.com/users/njalerikson","html_url":"https://github.com/njalerikson","followers_url":"https://api.github.com/users/njalerikson/followers","following_url":"https://api.github.com/users/njalerikson/following{/other_user}","gists_url":"https://api.github.com/users/njalerikson/gists{/gist_id}","starred_url":"https://api.github.com/users/njalerikson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njalerikson/subscriptions","organizations_url":"https://api.github.com/users/njalerikson/orgs","repos_url":"https://api.github.com/users/njalerikson/repos","events_url":"https://api.github.com/users/njalerikson/events{/privacy}","received_events_url":"https://api.github.com/users/njalerikson/received_events","type":"User","site_admin":false},"body":"Didn't realize conda wasn't using the 78 char convention.","created_at":"2018-03-15T14:17:14Z","updated_at":"2018-03-15T14:17:15Z","html_url":"https://github.com/conda/conda/pull/7026#discussion_r174797540","pull_request_url":"https://api.github.com/repos/conda/conda/pulls/7026","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/conda/conda/pulls/comments/174797540"},"html":{"href":"https://github.com/conda/conda/pull/7026#discussion_r174797540"},"pull_request":{"href":"https://api.github.com/repos/conda/conda/pulls/7026"}},"in_reply_to_id":174706762},"pull_request":{"url":"https://api.github.com/repos/conda/conda/pulls/7026","id":174655892,"html_url":"https://github.com/conda/conda/pull/7026","diff_url":"https://github.com/conda/conda/pull/7026.diff","patch_url":"https://github.com/conda/conda/pull/7026.patch","issue_url":"https://api.github.com/repos/conda/conda/issues/7026","number":7026,"state":"open","locked":false,"title":"Two phase deactivate","user":{"login":"njalerikson","id":4546435,"avatar_url":"https://avatars3.githubusercontent.com/u/4546435?v=4","gravatar_id":"","url":"https://api.github.com/users/njalerikson","html_url":"https://github.com/njalerikson","followers_url":"https://api.github.com/users/njalerikson/followers","following_url":"https://api.github.com/users/njalerikson/following{/other_user}","gists_url":"https://api.github.com/users/njalerikson/gists{/gist_id}","starred_url":"https://api.github.com/users/njalerikson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njalerikson/subscriptions","organizations_url":"https://api.github.com/users/njalerikson/orgs","repos_url":"https://api.github.com/users/njalerikson/repos","events_url":"https://api.github.com/users/njalerikson/events{/privacy}","received_events_url":"https://api.github.com/users/njalerikson/received_events","type":"User","site_admin":false},"body":"This is the PR for #3915.\r\n\r\nAs discussed there this PR solves the `{de,}activate.d` scripts' issue of being unable to change the `$PATH` by introducing a two phase deactivate.\r\n\r\nTwo phase because upon the first call, if there are `deactivate.d` scripts then the first phase is to source those scripts and then to do a second conda call - `deactivatepost`. The second phase, the deactivate post, will then perform the final unsetting, prompt modifications, and `$PATH` modification. If however there are no `deactivate.d` scripts then there will only be a single deactivate phase.\r\n\r\nThis is a relatively dumb fix in my opinion, primarily because I've statically embedded the `deactivatepost` command in the Activator class for each shell. I would love to hear any smarter ideas.\r\n\r\nAs discussed with @kalefranz, this is not an ideal fix but rather a quick fix until other longterm ideas become reality.","created_at":"2018-03-13T13:15:13Z","updated_at":"2018-03-15T14:17:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06cedc85b8768f25ed305911e9804b430f030dba","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[{"name":"conda-core","id":2042511,"slug":"conda-core","description":"Core conda team. Can merge PRs into main-line feature release branches.","privacy":"closed","url":"https://api.github.com/teams/2042511","members_url":"https://api.github.com/teams/2042511/members{/member}","repositories_url":"https://api.github.com/teams/2042511/repos","permission":"pull"}],"labels":[{"id":865679648,"url":"https://api.github.com/repos/conda/conda/labels/tag:shell","name":"tag:shell","color":"f4c5f9","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/conda/conda/pulls/7026/commits","review_comments_url":"https://api.github.com/repos/conda/conda/pulls/7026/comments","review_comment_url":"https://api.github.com/repos/conda/conda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/conda/conda/issues/7026/comments","statuses_url":"https://api.github.com/repos/conda/conda/statuses/f015e329ac8e55ca30c6424de6cfd9a3b9f5c89d","head":{"label":"njalerikson:two-phase-deactivate","ref":"two-phase-deactivate","sha":"f015e329ac8e55ca30c6424de6cfd9a3b9f5c89d","user":{"login":"njalerikson","id":4546435,"avatar_url":"https://avatars3.githubusercontent.com/u/4546435?v=4","gravatar_id":"","url":"https://api.github.com/users/njalerikson","html_url":"https://github.com/njalerikson","followers_url":"https://api.github.com/users/njalerikson/followers","following_url":"https://api.github.com/users/njalerikson/following{/other_user}","gists_url":"https://api.github.com/users/njalerikson/gists{/gist_id}","starred_url":"https://api.github.com/users/njalerikson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njalerikson/subscriptions","organizations_url":"https://api.github.com/users/njalerikson/orgs","repos_url":"https://api.github.com/users/njalerikson/repos","events_url":"https://api.github.com/users/njalerikson/events{/privacy}","received_events_url":"https://api.github.com/users/njalerikson/received_events","type":"User","site_admin":false},"repo":{"id":124420267,"name":"conda","full_name":"njalerikson/conda","owner":{"login":"njalerikson","id":4546435,"avatar_url":"https://avatars3.githubusercontent.com/u/4546435?v=4","gravatar_id":"","url":"https://api.github.com/users/njalerikson","html_url":"https://github.com/njalerikson","followers_url":"https://api.github.com/users/njalerikson/followers","following_url":"https://api.github.com/users/njalerikson/following{/other_user}","gists_url":"https://api.github.com/users/njalerikson/gists{/gist_id}","starred_url":"https://api.github.com/users/njalerikson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njalerikson/subscriptions","organizations_url":"https://api.github.com/users/njalerikson/orgs","repos_url":"https://api.github.com/users/njalerikson/repos","events_url":"https://api.github.com/users/njalerikson/events{/privacy}","received_events_url":"https://api.github.com/users/njalerikson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/njalerikson/conda","description":"OS-agnostic, system-level binary package manager and ecosystem","fork":true,"url":"https://api.github.com/repos/njalerikson/conda","forks_url":"https://api.github.com/repos/njalerikson/conda/forks","keys_url":"https://api.github.com/repos/njalerikson/conda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/njalerikson/conda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/njalerikson/conda/teams","hooks_url":"https://api.github.com/repos/njalerikson/conda/hooks","issue_events_url":"https://api.github.com/repos/njalerikson/conda/issues/events{/number}","events_url":"https://api.github.com/repos/njalerikson/conda/events","assignees_url":"https://api.github.com/repos/njalerikson/conda/assignees{/user}","branches_url":"https://api.github.com/repos/njalerikson/conda/branches{/branch}","tags_url":"https://api.github.com/repos/njalerikson/conda/tags","blobs_url":"https://api.github.com/repos/njalerikson/conda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/njalerikson/conda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/njalerikson/conda/git/refs{/sha}","trees_url":"https://api.github.com/repos/njalerikson/conda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/njalerikson/conda/statuses/{sha}","languages_url":"https://api.github.com/repos/njalerikson/conda/languages","stargazers_url":"https://api.github.com/repos/njalerikson/conda/stargazers","contributors_url":"https://api.github.com/repos/njalerikson/conda/contributors","subscribers_url":"https://api.github.com/repos/njalerikson/conda/subscribers","subscription_url":"https://api.github.com/repos/njalerikson/conda/subscription","commits_url":"https://api.github.com/repos/njalerikson/conda/commits{/sha}","git_commits_url":"https://api.github.com/repos/njalerikson/conda/git/commits{/sha}","comments_url":"https://api.github.com/repos/njalerikson/conda/comments{/number}","issue_comment_url":"https://api.github.com/repos/njalerikson/conda/issues/comments{/number}","contents_url":"https://api.github.com/repos/njalerikson/conda/contents/{+path}","compare_url":"https://api.github.com/repos/njalerikson/conda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/njalerikson/conda/merges","archive_url":"https://api.github.com/repos/njalerikson/conda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/njalerikson/conda/downloads","issues_url":"https://api.github.com/repos/njalerikson/conda/issues{/number}","pulls_url":"https://api.github.com/repos/njalerikson/conda/pulls{/number}","milestones_url":"https://api.github.com/repos/njalerikson/conda/milestones{/number}","notifications_url":"https://api.github.com/repos/njalerikson/conda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/njalerikson/conda/labels{/name}","releases_url":"https://api.github.com/repos/njalerikson/conda/releases{/id}","deployments_url":"https://api.github.com/repos/njalerikson/conda/deployments","created_at":"2018-03-08T16:43:37Z","updated_at":"2018-03-08T16:43:40Z","pushed_at":"2018-03-14T22:33:32Z","git_url":"git://github.com/njalerikson/conda.git","ssh_url":"git@github.com:njalerikson/conda.git","clone_url":"https://github.com/njalerikson/conda.git","svn_url":"https://github.com/njalerikson/conda","homepage":"https://conda.io","size":21778,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"conda:master","ref":"master","sha":"90a0d121dab54fb57bd6e359dd3e673086b7c30a","user":{"login":"conda","id":6392739,"avatar_url":"https://avatars0.githubusercontent.com/u/6392739?v=4","gravatar_id":"","url":"https://api.github.com/users/conda","html_url":"https://github.com/conda","followers_url":"https://api.github.com/users/conda/followers","following_url":"https://api.github.com/users/conda/following{/other_user}","gists_url":"https://api.github.com/users/conda/gists{/gist_id}","starred_url":"https://api.github.com/users/conda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conda/subscriptions","organizations_url":"https://api.github.com/users/conda/orgs","repos_url":"https://api.github.com/users/conda/repos","events_url":"https://api.github.com/users/conda/events{/privacy}","received_events_url":"https://api.github.com/users/conda/received_events","type":"Organization","site_admin":false},"repo":{"id":6235174,"name":"conda","full_name":"conda/conda","owner":{"login":"conda","id":6392739,"avatar_url":"https://avatars0.githubusercontent.com/u/6392739?v=4","gravatar_id":"","url":"https://api.github.com/users/conda","html_url":"https://github.com/conda","followers_url":"https://api.github.com/users/conda/followers","following_url":"https://api.github.com/users/conda/following{/other_user}","gists_url":"https://api.github.com/users/conda/gists{/gist_id}","starred_url":"https://api.github.com/users/conda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conda/subscriptions","organizations_url":"https://api.github.com/users/conda/orgs","repos_url":"https://api.github.com/users/conda/repos","events_url":"https://api.github.com/users/conda/events{/privacy}","received_events_url":"https://api.github.com/users/conda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/conda/conda","description":"OS-agnostic, system-level binary package manager and ecosystem","fork":false,"url":"https://api.github.com/repos/conda/conda","forks_url":"https://api.github.com/repos/conda/conda/forks","keys_url":"https://api.github.com/repos/conda/conda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/conda/conda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/conda/conda/teams","hooks_url":"https://api.github.com/repos/conda/conda/hooks","issue_events_url":"https://api.github.com/repos/conda/conda/issues/events{/number}","events_url":"https://api.github.com/repos/conda/conda/events","assignees_url":"https://api.github.com/repos/conda/conda/assignees{/user}","branches_url":"https://api.github.com/repos/conda/conda/branches{/branch}","tags_url":"https://api.github.com/repos/conda/conda/tags","blobs_url":"https://api.github.com/repos/conda/conda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/conda/conda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/conda/conda/git/refs{/sha}","trees_url":"https://api.github.com/repos/conda/conda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/conda/conda/statuses/{sha}","languages_url":"https://api.github.com/repos/conda/conda/languages","stargazers_url":"https://api.github.com/repos/conda/conda/stargazers","contributors_url":"https://api.github.com/repos/conda/conda/contributors","subscribers_url":"https://api.github.com/repos/conda/conda/subscribers","subscription_url":"https://api.github.com/repos/conda/conda/subscription","commits_url":"https://api.github.com/repos/conda/conda/commits{/sha}","git_commits_url":"https://api.github.com/repos/conda/conda/git/commits{/sha}","comments_url":"https://api.github.com/repos/conda/conda/comments{/number}","issue_comment_url":"https://api.github.com/repos/conda/conda/issues/comments{/number}","contents_url":"https://api.github.com/repos/conda/conda/contents/{+path}","compare_url":"https://api.github.com/repos/conda/conda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/conda/conda/merges","archive_url":"https://api.github.com/repos/conda/conda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/conda/conda/downloads","issues_url":"https://api.github.com/repos/conda/conda/issues{/number}","pulls_url":"https://api.github.com/repos/conda/conda/pulls{/number}","milestones_url":"https://api.github.com/repos/conda/conda/milestones{/number}","notifications_url":"https://api.github.com/repos/conda/conda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/conda/conda/labels{/name}","releases_url":"https://api.github.com/repos/conda/conda/releases{/id}","deployments_url":"https://api.github.com/repos/conda/conda/deployments","created_at":"2012-10-15T22:08:03Z","updated_at":"2018-03-15T13:25:34Z","pushed_at":"2018-03-14T22:33:33Z","git_url":"git://github.com/conda/conda.git","ssh_url":"git@github.com:conda/conda.git","clone_url":"https://github.com/conda/conda.git","svn_url":"https://github.com/conda/conda","homepage":"https://conda.io","size":21720,"stargazers_count":1998,"watchers_count":1998,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":528,"mirror_url":null,"archived":false,"open_issues_count":436,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":528,"open_issues":436,"watchers":1998,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/conda/conda/pulls/7026"},"html":{"href":"https://github.com/conda/conda/pull/7026"},"issue":{"href":"https://api.github.com/repos/conda/conda/issues/7026"},"comments":{"href":"https://api.github.com/repos/conda/conda/issues/7026/comments"},"review_comments":{"href":"https://api.github.com/repos/conda/conda/pulls/7026/comments"},"review_comment":{"href":"https://api.github.com/repos/conda/conda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/conda/conda/pulls/7026/commits"},"statuses":{"href":"https://api.github.com/repos/conda/conda/statuses/f015e329ac8e55ca30c6424de6cfd9a3b9f5c89d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"njalerikson"}}