{"action":"created","comment":{"url":"https://api.github.com/repos/dnanexus/dx-toolkit/pulls/comments/63381422","id":63381422,"diff_hunk":"@@ -41,4 +41,4 @@ if 'DX_JOB_ID' in os.environ:\n             if dep['id']['$dnanexus_link'].startswith('file-'):\n                 print \"*** Downloading bundled file\", dep['name']\n                 dxpy.download_dxfile(dep['id'], dep['name'])\n-                subprocess.check_call(['dx-unpack', dep['name']])\n+                subprocess.check_call(['dx-unpack', re.escape(dep['name'])])","path":"src/python/scripts/dx-fetch-bundled-depends","position":14,"original_position":14,"commit_id":"0bed682f9a5f6210d75a18aa38a8eaa0172fe2d6","original_commit_id":"0bed682f9a5f6210d75a18aa38a8eaa0172fe2d6","user":{"login":"psung","id":146557,"avatar_url":"https://avatars.githubusercontent.com/u/146557?v=3","gravatar_id":"","url":"https://api.github.com/users/psung","html_url":"https://github.com/psung","followers_url":"https://api.github.com/users/psung/followers","following_url":"https://api.github.com/users/psung/following{/other_user}","gists_url":"https://api.github.com/users/psung/gists{/gist_id}","starred_url":"https://api.github.com/users/psung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psung/subscriptions","organizations_url":"https://api.github.com/users/psung/orgs","repos_url":"https://api.github.com/users/psung/repos","events_url":"https://api.github.com/users/psung/events{/privacy}","received_events_url":"https://api.github.com/users/psung/received_events","type":"User","site_admin":false},"body":"I think that's because dx-unpack itself has a bug in its treatment of the filename. We should wait for that fix to land so as not to force callers of dx-unpack to escape the command line.","created_at":"2016-05-16T16:28:18Z","updated_at":"2016-05-16T16:28:18Z","html_url":"https://github.com/dnanexus/dx-toolkit/pull/147#discussion_r63381422","pull_request_url":"https://api.github.com/repos/dnanexus/dx-toolkit/pulls/147","_links":{"self":{"href":"https://api.github.com/repos/dnanexus/dx-toolkit/pulls/comments/63381422"},"html":{"href":"https://github.com/dnanexus/dx-toolkit/pull/147#discussion_r63381422"},"pull_request":{"href":"https://api.github.com/repos/dnanexus/dx-toolkit/pulls/147"}}},"pull_request":{"url":"https://api.github.com/repos/dnanexus/dx-toolkit/pulls/147","id":70070706,"html_url":"https://github.com/dnanexus/dx-toolkit/pull/147","diff_url":"https://github.com/dnanexus/dx-toolkit/pull/147.diff","patch_url":"https://github.com/dnanexus/dx-toolkit/pull/147.patch","issue_url":"https://api.github.com/repos/dnanexus/dx-toolkit/issues/147","number":147,"state":"open","locked":false,"title":"Escape file name with spaces for dx-unpack","user":{"login":"adasgt","id":523228,"avatar_url":"https://avatars.githubusercontent.com/u/523228?v=3","gravatar_id":"","url":"https://api.github.com/users/adasgt","html_url":"https://github.com/adasgt","followers_url":"https://api.github.com/users/adasgt/followers","following_url":"https://api.github.com/users/adasgt/following{/other_user}","gists_url":"https://api.github.com/users/adasgt/gists{/gist_id}","starred_url":"https://api.github.com/users/adasgt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adasgt/subscriptions","organizations_url":"https://api.github.com/users/adasgt/orgs","repos_url":"https://api.github.com/users/adasgt/repos","events_url":"https://api.github.com/users/adasgt/events{/privacy}","received_events_url":"https://api.github.com/users/adasgt/received_events","type":"User","site_admin":false},"body":"@psung please review.\r\n\r\nIf 'bundledDepends' refers to a file name containing un-escaped spaces, dx-unpack fails as it reads each string in the file name as an argument. The error looks like as follows when a file name is \"my asset test.tar.gz\":\r\n\r\n'\r\n_Downloading bundled file my asset test.tar.gz\r\n>>> Unpacking my to /\r\n *   dx_helpers.sh, line 20: my does not exist\r\nTraceback (most recent call last):\r\n  File \"/usr/bin/dx-prepare-exec-env\", line 45, in <module>\r\n    installer.install()\r\n  File \"/usr/share/dnanexus/lib/python2.7/site-packages/dxpy/utils/exec_utils.py\", line 395, in install\r\n    self._install_dep_bundle(dep_group[\"deps\"][0])\r\n  File \"/usr/share/dnanexus/lib/python2.7/site-packages/dxpy/utils/exec_utils.py\", line 388, in _install_dep_bundle\r\n    self.run(\"dx-unpack '{}'\".format(bundle[\"name\"]))\r\n  File \"/usr/share/dnanexus/lib/python2.7/site-packages/dxpy/utils/exec_utils.py\", line 368, in run\r\n    subprocess.check_call(cmd, shell=True, stdout=log_fh, stderr=log_fh)\r\n  File \"/usr/lib/python2.7/subprocess.py\", line 511, in check_call\r\n    raise CalledProcessError(retcode, cmd)\r\nsubprocess.CalledProcessError: Command 'dx-unpack 'my asset test.tar.gz'' returned non-zero exit status 1_\r\n'\r\n\r\nSo escaped the file name in subprocess call.\r\n","created_at":"2016-05-13T23:10:49Z","updated_at":"2016-05-16T16:28:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1db1ad6e8788ba24bd85f7863ffb24037c4a1f3b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dnanexus/dx-toolkit/pulls/147/commits","review_comments_url":"https://api.github.com/repos/dnanexus/dx-toolkit/pulls/147/comments","review_comment_url":"https://api.github.com/repos/dnanexus/dx-toolkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dnanexus/dx-toolkit/issues/147/comments","statuses_url":"https://api.github.com/repos/dnanexus/dx-toolkit/statuses/0bed682f9a5f6210d75a18aa38a8eaa0172fe2d6","head":{"label":"dnanexus:adas-dx-unpack-ignore-space","ref":"adas-dx-unpack-ignore-space","sha":"0bed682f9a5f6210d75a18aa38a8eaa0172fe2d6","user":{"login":"dnanexus","id":1161297,"avatar_url":"https://avatars.githubusercontent.com/u/1161297?v=3","gravatar_id":"","url":"https://api.github.com/users/dnanexus","html_url":"https://github.com/dnanexus","followers_url":"https://api.github.com/users/dnanexus/followers","following_url":"https://api.github.com/users/dnanexus/following{/other_user}","gists_url":"https://api.github.com/users/dnanexus/gists{/gist_id}","starred_url":"https://api.github.com/users/dnanexus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnanexus/subscriptions","organizations_url":"https://api.github.com/users/dnanexus/orgs","repos_url":"https://api.github.com/users/dnanexus/repos","events_url":"https://api.github.com/users/dnanexus/events{/privacy}","received_events_url":"https://api.github.com/users/dnanexus/received_events","type":"Organization","site_admin":false},"repo":{"id":4802269,"name":"dx-toolkit","full_name":"dnanexus/dx-toolkit","owner":{"login":"dnanexus","id":1161297,"avatar_url":"https://avatars.githubusercontent.com/u/1161297?v=3","gravatar_id":"","url":"https://api.github.com/users/dnanexus","html_url":"https://github.com/dnanexus","followers_url":"https://api.github.com/users/dnanexus/followers","following_url":"https://api.github.com/users/dnanexus/following{/other_user}","gists_url":"https://api.github.com/users/dnanexus/gists{/gist_id}","starred_url":"https://api.github.com/users/dnanexus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnanexus/subscriptions","organizations_url":"https://api.github.com/users/dnanexus/orgs","repos_url":"https://api.github.com/users/dnanexus/repos","events_url":"https://api.github.com/users/dnanexus/events{/privacy}","received_events_url":"https://api.github.com/users/dnanexus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dnanexus/dx-toolkit","description":"DNAnexus platform client libraries","fork":false,"url":"https://api.github.com/repos/dnanexus/dx-toolkit","forks_url":"https://api.github.com/repos/dnanexus/dx-toolkit/forks","keys_url":"https://api.github.com/repos/dnanexus/dx-toolkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dnanexus/dx-toolkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dnanexus/dx-toolkit/teams","hooks_url":"https://api.github.com/repos/dnanexus/dx-toolkit/hooks","issue_events_url":"https://api.github.com/repos/dnanexus/dx-toolkit/issues/events{/number}","events_url":"https://api.github.com/repos/dnanexus/dx-toolkit/events","assignees_url":"https://api.github.com/repos/dnanexus/dx-toolkit/assignees{/user}","branches_url":"https://api.github.com/repos/dnanexus/dx-toolkit/branches{/branch}","tags_url":"https://api.github.com/repos/dnanexus/dx-toolkit/tags","blobs_url":"https://api.github.com/repos/dnanexus/dx-toolkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dnanexus/dx-toolkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dnanexus/dx-toolkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/dnanexus/dx-toolkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dnanexus/dx-toolkit/statuses/{sha}","languages_url":"https://api.github.com/repos/dnanexus/dx-toolkit/languages","stargazers_url":"https://api.github.com/repos/dnanexus/dx-toolkit/stargazers","contributors_url":"https://api.github.com/repos/dnanexus/dx-toolkit/contributors","subscribers_url":"https://api.github.com/repos/dnanexus/dx-toolkit/subscribers","subscription_url":"https://api.github.com/repos/dnanexus/dx-toolkit/subscription","commits_url":"https://api.github.com/repos/dnanexus/dx-toolkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/dnanexus/dx-toolkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/dnanexus/dx-toolkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/dnanexus/dx-toolkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/dnanexus/dx-toolkit/contents/{+path}","compare_url":"https://api.github.com/repos/dnanexus/dx-toolkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dnanexus/dx-toolkit/merges","archive_url":"https://api.github.com/repos/dnanexus/dx-toolkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dnanexus/dx-toolkit/downloads","issues_url":"https://api.github.com/repos/dnanexus/dx-toolkit/issues{/number}","pulls_url":"https://api.github.com/repos/dnanexus/dx-toolkit/pulls{/number}","milestones_url":"https://api.github.com/repos/dnanexus/dx-toolkit/milestones{/number}","notifications_url":"https://api.github.com/repos/dnanexus/dx-toolkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dnanexus/dx-toolkit/labels{/name}","releases_url":"https://api.github.com/repos/dnanexus/dx-toolkit/releases{/id}","deployments_url":"https://api.github.com/repos/dnanexus/dx-toolkit/deployments","created_at":"2012-06-27T00:23:47Z","updated_at":"2016-05-16T11:42:13Z","pushed_at":"2016-05-14T14:58:16Z","git_url":"git://github.com/dnanexus/dx-toolkit.git","ssh_url":"git@github.com:dnanexus/dx-toolkit.git","clone_url":"https://github.com/dnanexus/dx-toolkit.git","svn_url":"https://github.com/dnanexus/dx-toolkit","homepage":"http://autodoc.dnanexus.com/","size":19080,"stargazers_count":34,"watchers_count":34,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":9,"forks":31,"open_issues":9,"watchers":34,"default_branch":"master"}},"base":{"label":"dnanexus:master","ref":"master","sha":"41b1b21ee0b2eea6409dbed1b65483ca00fdaafd","user":{"login":"dnanexus","id":1161297,"avatar_url":"https://avatars.githubusercontent.com/u/1161297?v=3","gravatar_id":"","url":"https://api.github.com/users/dnanexus","html_url":"https://github.com/dnanexus","followers_url":"https://api.github.com/users/dnanexus/followers","following_url":"https://api.github.com/users/dnanexus/following{/other_user}","gists_url":"https://api.github.com/users/dnanexus/gists{/gist_id}","starred_url":"https://api.github.com/users/dnanexus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnanexus/subscriptions","organizations_url":"https://api.github.com/users/dnanexus/orgs","repos_url":"https://api.github.com/users/dnanexus/repos","events_url":"https://api.github.com/users/dnanexus/events{/privacy}","received_events_url":"https://api.github.com/users/dnanexus/received_events","type":"Organization","site_admin":false},"repo":{"id":4802269,"name":"dx-toolkit","full_name":"dnanexus/dx-toolkit","owner":{"login":"dnanexus","id":1161297,"avatar_url":"https://avatars.githubusercontent.com/u/1161297?v=3","gravatar_id":"","url":"https://api.github.com/users/dnanexus","html_url":"https://github.com/dnanexus","followers_url":"https://api.github.com/users/dnanexus/followers","following_url":"https://api.github.com/users/dnanexus/following{/other_user}","gists_url":"https://api.github.com/users/dnanexus/gists{/gist_id}","starred_url":"https://api.github.com/users/dnanexus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnanexus/subscriptions","organizations_url":"https://api.github.com/users/dnanexus/orgs","repos_url":"https://api.github.com/users/dnanexus/repos","events_url":"https://api.github.com/users/dnanexus/events{/privacy}","received_events_url":"https://api.github.com/users/dnanexus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dnanexus/dx-toolkit","description":"DNAnexus platform client libraries","fork":false,"url":"https://api.github.com/repos/dnanexus/dx-toolkit","forks_url":"https://api.github.com/repos/dnanexus/dx-toolkit/forks","keys_url":"https://api.github.com/repos/dnanexus/dx-toolkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dnanexus/dx-toolkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dnanexus/dx-toolkit/teams","hooks_url":"https://api.github.com/repos/dnanexus/dx-toolkit/hooks","issue_events_url":"https://api.github.com/repos/dnanexus/dx-toolkit/issues/events{/number}","events_url":"https://api.github.com/repos/dnanexus/dx-toolkit/events","assignees_url":"https://api.github.com/repos/dnanexus/dx-toolkit/assignees{/user}","branches_url":"https://api.github.com/repos/dnanexus/dx-toolkit/branches{/branch}","tags_url":"https://api.github.com/repos/dnanexus/dx-toolkit/tags","blobs_url":"https://api.github.com/repos/dnanexus/dx-toolkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dnanexus/dx-toolkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dnanexus/dx-toolkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/dnanexus/dx-toolkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dnanexus/dx-toolkit/statuses/{sha}","languages_url":"https://api.github.com/repos/dnanexus/dx-toolkit/languages","stargazers_url":"https://api.github.com/repos/dnanexus/dx-toolkit/stargazers","contributors_url":"https://api.github.com/repos/dnanexus/dx-toolkit/contributors","subscribers_url":"https://api.github.com/repos/dnanexus/dx-toolkit/subscribers","subscription_url":"https://api.github.com/repos/dnanexus/dx-toolkit/subscription","commits_url":"https://api.github.com/repos/dnanexus/dx-toolkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/dnanexus/dx-toolkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/dnanexus/dx-toolkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/dnanexus/dx-toolkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/dnanexus/dx-toolkit/contents/{+path}","compare_url":"https://api.github.com/repos/dnanexus/dx-toolkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dnanexus/dx-toolkit/merges","archive_url":"https://api.github.com/repos/dnanexus/dx-toolkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dnanexus/dx-toolkit/downloads","issues_url":"https://api.github.com/repos/dnanexus/dx-toolkit/issues{/number}","pulls_url":"https://api.github.com/repos/dnanexus/dx-toolkit/pulls{/number}","milestones_url":"https://api.github.com/repos/dnanexus/dx-toolkit/milestones{/number}","notifications_url":"https://api.github.com/repos/dnanexus/dx-toolkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dnanexus/dx-toolkit/labels{/name}","releases_url":"https://api.github.com/repos/dnanexus/dx-toolkit/releases{/id}","deployments_url":"https://api.github.com/repos/dnanexus/dx-toolkit/deployments","created_at":"2012-06-27T00:23:47Z","updated_at":"2016-05-16T11:42:13Z","pushed_at":"2016-05-14T14:58:16Z","git_url":"git://github.com/dnanexus/dx-toolkit.git","ssh_url":"git@github.com:dnanexus/dx-toolkit.git","clone_url":"https://github.com/dnanexus/dx-toolkit.git","svn_url":"https://github.com/dnanexus/dx-toolkit","homepage":"http://autodoc.dnanexus.com/","size":19080,"stargazers_count":34,"watchers_count":34,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":9,"forks":31,"open_issues":9,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dnanexus/dx-toolkit/pulls/147"},"html":{"href":"https://github.com/dnanexus/dx-toolkit/pull/147"},"issue":{"href":"https://api.github.com/repos/dnanexus/dx-toolkit/issues/147"},"comments":{"href":"https://api.github.com/repos/dnanexus/dx-toolkit/issues/147/comments"},"review_comments":{"href":"https://api.github.com/repos/dnanexus/dx-toolkit/pulls/147/comments"},"review_comment":{"href":"https://api.github.com/repos/dnanexus/dx-toolkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dnanexus/dx-toolkit/pulls/147/commits"},"statuses":{"href":"https://api.github.com/repos/dnanexus/dx-toolkit/statuses/0bed682f9a5f6210d75a18aa38a8eaa0172fe2d6"}}}}