{"action":"created","comment":{"url":"https://api.github.com/repos/conda/conda-pack/pulls/comments/225778290","pull_request_review_id":165452689,"id":225778290,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTc3ODI5MA==","diff_hunk":"@@ -813,8 +813,7 @@ def rewrite_shebang(data, target, prefix):\n             new_shebang = '#!/usr/bin/env %s%s' % (executable_name,\n                                                    options.decode('utf-8'))\n             data = data.replace(shebang, new_shebang.encode('utf-8'))\n-\n-        return data, True\n+            return data, True","path":"conda_pack/core.py","position":56,"original_position":6,"commit_id":"df52cb726734650f0be6590105c8891817113ec3","original_commit_id":"df52cb726734650f0be6590105c8891817113ec3","user":{"login":"mcg1969","id":2797735,"node_id":"MDQ6VXNlcjI3OTc3MzU=","avatar_url":"https://avatars1.githubusercontent.com/u/2797735?v=4","gravatar_id":"","url":"https://api.github.com/users/mcg1969","html_url":"https://github.com/mcg1969","followers_url":"https://api.github.com/users/mcg1969/followers","following_url":"https://api.github.com/users/mcg1969/following{/other_user}","gists_url":"https://api.github.com/users/mcg1969/gists{/gist_id}","starred_url":"https://api.github.com/users/mcg1969/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcg1969/subscriptions","organizations_url":"https://api.github.com/users/mcg1969/orgs","repos_url":"https://api.github.com/users/mcg1969/repos","events_url":"https://api.github.com/users/mcg1969/events{/privacy}","received_events_url":"https://api.github.com/users/mcg1969/received_events","type":"User","site_admin":false},"body":"By moving this return inside the if block, we only return `True` if the shebang is _actually_ changed. There are several scripts that use simple `/bin/sh` shebangs but contain the prefix; those still need to be edited, but the current code fails to do so.","created_at":"2018-10-17T04:31:42Z","updated_at":"2018-10-17T04:31:42Z","html_url":"https://github.com/conda/conda-pack/pull/54#discussion_r225778290","pull_request_url":"https://api.github.com/repos/conda/conda-pack/pulls/54","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/conda/conda-pack/pulls/comments/225778290"},"html":{"href":"https://github.com/conda/conda-pack/pull/54#discussion_r225778290"},"pull_request":{"href":"https://api.github.com/repos/conda/conda-pack/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/conda/conda-pack/pulls/54","id":223450411,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzNDUwNDEx","html_url":"https://github.com/conda/conda-pack/pull/54","diff_url":"https://github.com/conda/conda-pack/pull/54.diff","patch_url":"https://github.com/conda/conda-pack/pull/54.patch","issue_url":"https://api.github.com/repos/conda/conda-pack/issues/54","number":54,"state":"open","locked":false,"title":"Simpler prefix replacement for dest-prefix case","user":{"login":"mcg1969","id":2797735,"node_id":"MDQ6VXNlcjI3OTc3MzU=","avatar_url":"https://avatars1.githubusercontent.com/u/2797735?v=4","gravatar_id":"","url":"https://api.github.com/users/mcg1969","html_url":"https://github.com/mcg1969","followers_url":"https://api.github.com/users/mcg1969/followers","following_url":"https://api.github.com/users/mcg1969/following{/other_user}","gists_url":"https://api.github.com/users/mcg1969/gists{/gist_id}","starred_url":"https://api.github.com/users/mcg1969/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcg1969/subscriptions","organizations_url":"https://api.github.com/users/mcg1969/orgs","repos_url":"https://api.github.com/users/mcg1969/repos","events_url":"https://api.github.com/users/mcg1969/events{/privacy}","received_events_url":"https://api.github.com/users/mcg1969/received_events","type":"User","site_admin":false},"body":"_Builds on #48._\r\n\r\nWhen `dest-prefix` is supplied, there's really no need to do the more complicated `/usr/bin/env` shebang replacement. I've rearranged the logic in the `self.has_dest` case so that it never calls `rewrite_shebang`. \r\n\r\nFurthermore, `rewrite_shebang` was returning `True` (indicating a replacement was performed) even when the prefix was not found in the shebang itself. This was preventing certain files from being properly fixed, like `python3-config`, which have a generic shebang but contain the string in other locations as well.\r\n\r\nThe primary reason I want to do this, frankly, is so that we can keep conda's own activate/deactivate scripts around when conda is in the environment. But I think these changes are more worth considering on their own merits, so that proposed change is not in this PR.","created_at":"2018-10-17T02:30:57Z","updated_at":"2018-10-17T04:31:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8739ca24a61a47d74151ee750ee9846a7038cc0e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/conda/conda-pack/pulls/54/commits","review_comments_url":"https://api.github.com/repos/conda/conda-pack/pulls/54/comments","review_comment_url":"https://api.github.com/repos/conda/conda-pack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/conda/conda-pack/issues/54/comments","statuses_url":"https://api.github.com/repos/conda/conda-pack/statuses/df52cb726734650f0be6590105c8891817113ec3","head":{"label":"dsludwig:dest-prefix","ref":"dest-prefix","sha":"df52cb726734650f0be6590105c8891817113ec3","user":{"login":"dsludwig","id":787031,"node_id":"MDQ6VXNlcjc4NzAzMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/787031?v=4","gravatar_id":"","url":"https://api.github.com/users/dsludwig","html_url":"https://github.com/dsludwig","followers_url":"https://api.github.com/users/dsludwig/followers","following_url":"https://api.github.com/users/dsludwig/following{/other_user}","gists_url":"https://api.github.com/users/dsludwig/gists{/gist_id}","starred_url":"https://api.github.com/users/dsludwig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsludwig/subscriptions","organizations_url":"https://api.github.com/users/dsludwig/orgs","repos_url":"https://api.github.com/users/dsludwig/repos","events_url":"https://api.github.com/users/dsludwig/events{/privacy}","received_events_url":"https://api.github.com/users/dsludwig/received_events","type":"User","site_admin":false},"repo":{"id":148540894,"node_id":"MDEwOlJlcG9zaXRvcnkxNDg1NDA4OTQ=","name":"conda-pack","full_name":"dsludwig/conda-pack","private":false,"owner":{"login":"dsludwig","id":787031,"node_id":"MDQ6VXNlcjc4NzAzMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/787031?v=4","gravatar_id":"","url":"https://api.github.com/users/dsludwig","html_url":"https://github.com/dsludwig","followers_url":"https://api.github.com/users/dsludwig/followers","following_url":"https://api.github.com/users/dsludwig/following{/other_user}","gists_url":"https://api.github.com/users/dsludwig/gists{/gist_id}","starred_url":"https://api.github.com/users/dsludwig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsludwig/subscriptions","organizations_url":"https://api.github.com/users/dsludwig/orgs","repos_url":"https://api.github.com/users/dsludwig/repos","events_url":"https://api.github.com/users/dsludwig/events{/privacy}","received_events_url":"https://api.github.com/users/dsludwig/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dsludwig/conda-pack","description":"Package conda environments for redistribution","fork":true,"url":"https://api.github.com/repos/dsludwig/conda-pack","forks_url":"https://api.github.com/repos/dsludwig/conda-pack/forks","keys_url":"https://api.github.com/repos/dsludwig/conda-pack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dsludwig/conda-pack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dsludwig/conda-pack/teams","hooks_url":"https://api.github.com/repos/dsludwig/conda-pack/hooks","issue_events_url":"https://api.github.com/repos/dsludwig/conda-pack/issues/events{/number}","events_url":"https://api.github.com/repos/dsludwig/conda-pack/events","assignees_url":"https://api.github.com/repos/dsludwig/conda-pack/assignees{/user}","branches_url":"https://api.github.com/repos/dsludwig/conda-pack/branches{/branch}","tags_url":"https://api.github.com/repos/dsludwig/conda-pack/tags","blobs_url":"https://api.github.com/repos/dsludwig/conda-pack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dsludwig/conda-pack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dsludwig/conda-pack/git/refs{/sha}","trees_url":"https://api.github.com/repos/dsludwig/conda-pack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dsludwig/conda-pack/statuses/{sha}","languages_url":"https://api.github.com/repos/dsludwig/conda-pack/languages","stargazers_url":"https://api.github.com/repos/dsludwig/conda-pack/stargazers","contributors_url":"https://api.github.com/repos/dsludwig/conda-pack/contributors","subscribers_url":"https://api.github.com/repos/dsludwig/conda-pack/subscribers","subscription_url":"https://api.github.com/repos/dsludwig/conda-pack/subscription","commits_url":"https://api.github.com/repos/dsludwig/conda-pack/commits{/sha}","git_commits_url":"https://api.github.com/repos/dsludwig/conda-pack/git/commits{/sha}","comments_url":"https://api.github.com/repos/dsludwig/conda-pack/comments{/number}","issue_comment_url":"https://api.github.com/repos/dsludwig/conda-pack/issues/comments{/number}","contents_url":"https://api.github.com/repos/dsludwig/conda-pack/contents/{+path}","compare_url":"https://api.github.com/repos/dsludwig/conda-pack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dsludwig/conda-pack/merges","archive_url":"https://api.github.com/repos/dsludwig/conda-pack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dsludwig/conda-pack/downloads","issues_url":"https://api.github.com/repos/dsludwig/conda-pack/issues{/number}","pulls_url":"https://api.github.com/repos/dsludwig/conda-pack/pulls{/number}","milestones_url":"https://api.github.com/repos/dsludwig/conda-pack/milestones{/number}","notifications_url":"https://api.github.com/repos/dsludwig/conda-pack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dsludwig/conda-pack/labels{/name}","releases_url":"https://api.github.com/repos/dsludwig/conda-pack/releases{/id}","deployments_url":"https://api.github.com/repos/dsludwig/conda-pack/deployments","created_at":"2018-09-12T20:54:41Z","updated_at":"2018-09-21T00:11:49Z","pushed_at":"2018-10-17T04:16:37Z","git_url":"git://github.com/dsludwig/conda-pack.git","ssh_url":"git@github.com:dsludwig/conda-pack.git","clone_url":"https://github.com/dsludwig/conda-pack.git","svn_url":"https://github.com/dsludwig/conda-pack","homepage":"https://conda.github.io/conda-pack/","size":397,"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":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"conda:master","ref":"master","sha":"6f809009c2440c82d0d3f4ff97adbb6658bf8cee","user":{"login":"conda","id":6392739,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzOTI3Mzk=","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":107311555,"node_id":"MDEwOlJlcG9zaXRvcnkxMDczMTE1NTU=","name":"conda-pack","full_name":"conda/conda-pack","private":false,"owner":{"login":"conda","id":6392739,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzOTI3Mzk=","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},"html_url":"https://github.com/conda/conda-pack","description":"Package conda environments for redistribution","fork":false,"url":"https://api.github.com/repos/conda/conda-pack","forks_url":"https://api.github.com/repos/conda/conda-pack/forks","keys_url":"https://api.github.com/repos/conda/conda-pack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/conda/conda-pack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/conda/conda-pack/teams","hooks_url":"https://api.github.com/repos/conda/conda-pack/hooks","issue_events_url":"https://api.github.com/repos/conda/conda-pack/issues/events{/number}","events_url":"https://api.github.com/repos/conda/conda-pack/events","assignees_url":"https://api.github.com/repos/conda/conda-pack/assignees{/user}","branches_url":"https://api.github.com/repos/conda/conda-pack/branches{/branch}","tags_url":"https://api.github.com/repos/conda/conda-pack/tags","blobs_url":"https://api.github.com/repos/conda/conda-pack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/conda/conda-pack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/conda/conda-pack/git/refs{/sha}","trees_url":"https://api.github.com/repos/conda/conda-pack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/conda/conda-pack/statuses/{sha}","languages_url":"https://api.github.com/repos/conda/conda-pack/languages","stargazers_url":"https://api.github.com/repos/conda/conda-pack/stargazers","contributors_url":"https://api.github.com/repos/conda/conda-pack/contributors","subscribers_url":"https://api.github.com/repos/conda/conda-pack/subscribers","subscription_url":"https://api.github.com/repos/conda/conda-pack/subscription","commits_url":"https://api.github.com/repos/conda/conda-pack/commits{/sha}","git_commits_url":"https://api.github.com/repos/conda/conda-pack/git/commits{/sha}","comments_url":"https://api.github.com/repos/conda/conda-pack/comments{/number}","issue_comment_url":"https://api.github.com/repos/conda/conda-pack/issues/comments{/number}","contents_url":"https://api.github.com/repos/conda/conda-pack/contents/{+path}","compare_url":"https://api.github.com/repos/conda/conda-pack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/conda/conda-pack/merges","archive_url":"https://api.github.com/repos/conda/conda-pack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/conda/conda-pack/downloads","issues_url":"https://api.github.com/repos/conda/conda-pack/issues{/number}","pulls_url":"https://api.github.com/repos/conda/conda-pack/pulls{/number}","milestones_url":"https://api.github.com/repos/conda/conda-pack/milestones{/number}","notifications_url":"https://api.github.com/repos/conda/conda-pack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/conda/conda-pack/labels{/name}","releases_url":"https://api.github.com/repos/conda/conda-pack/releases{/id}","deployments_url":"https://api.github.com/repos/conda/conda-pack/deployments","created_at":"2017-10-17T18:58:44Z","updated_at":"2018-10-15T08:37:50Z","pushed_at":"2018-10-17T03:06:43Z","git_url":"git://github.com/conda/conda-pack.git","ssh_url":"git@github.com:conda/conda-pack.git","clone_url":"https://github.com/conda/conda-pack.git","svn_url":"https://github.com/conda/conda-pack","homepage":"https://conda.github.io/conda-pack/","size":352,"stargazers_count":55,"watchers_count":55,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":11,"open_issues":7,"watchers":55,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/conda/conda-pack/pulls/54"},"html":{"href":"https://github.com/conda/conda-pack/pull/54"},"issue":{"href":"https://api.github.com/repos/conda/conda-pack/issues/54"},"comments":{"href":"https://api.github.com/repos/conda/conda-pack/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/conda/conda-pack/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/conda/conda-pack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/conda/conda-pack/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/conda/conda-pack/statuses/df52cb726734650f0be6590105c8891817113ec3"}},"author_association":"NONE"}}
{"actor":{"display_login":"mcg1969"}}