{"action":"created","comment":{"url":"https://api.github.com/repos/creationix/nvm/pulls/comments/245441368","pull_request_review_id":189554265,"id":245441368,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTQ0MTM2OA==","diff_hunk":"@@ -1907,6 +1908,64 @@ nvm_download_artifact() {\n   nvm_echo \"${TARBALL}\"\n }\n \n+nvm_tar_knows_J() {\n+  ERR_MSG=$(tar -J 2>&1 | head -1)\n+  [ \"_$ERR_MSG\" != \"_tar: unknown option -- J\" ]\n+}\n+\n+\n+# args: tarball path, NVM_OS var\n+nvm_extract_tar_artifact() {\n+  local tar_compression_flag\n+  local TARBALL\n+  local TAR_COMMAND_SUFFIX\n+  local TMPDIR\n+  local NVM_OS\n+  local tar\n+\n+  TARBALL=\"${1}\"\n+  NVM_OS=\"${2}\"\n+\n+  tar='tar'\n+  if [ \"${NVM_OS}\" = 'aix' ]; then\n+    tar='gtar'\n+  fi\n+\n+  tar_compression_flag='z'\n+\n+  if nvm_supports_xz \"${VERSION}\" && nvm_tar_knows_J; then\n+    tar_compression_flag='J'","path":"nvm.sh","position":38,"original_position":38,"commit_id":"ef65b5a418740ed871f1da494d017d3f27ad6fc3","original_commit_id":"ef65b5a418740ed871f1da494d017d3f27ad6fc3","user":{"login":"ljharb","id":45469,"node_id":"MDQ6VXNlcjQ1NDY5","avatar_url":"https://avatars1.githubusercontent.com/u/45469?v=4","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"body":"let's move this `if` block into the `else` below, since that's the only path it matters.","created_at":"2019-01-04T22:45:19Z","updated_at":"2019-01-04T22:47:56Z","html_url":"https://github.com/creationix/nvm/pull/1972#discussion_r245441368","pull_request_url":"https://api.github.com/repos/creationix/nvm/pulls/1972","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/creationix/nvm/pulls/comments/245441368"},"html":{"href":"https://github.com/creationix/nvm/pull/1972#discussion_r245441368"},"pull_request":{"href":"https://api.github.com/repos/creationix/nvm/pulls/1972"}}},"pull_request":{"url":"https://api.github.com/repos/creationix/nvm/pulls/1972","id":241581769,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxNTgxNzY5","html_url":"https://github.com/creationix/nvm/pull/1972","diff_url":"https://github.com/creationix/nvm/pull/1972.diff","patch_url":"https://github.com/creationix/nvm/pull/1972.patch","issue_url":"https://api.github.com/repos/creationix/nvm/issues/1972","number":1972,"state":"open","locked":false,"title":"Adds support for OpenBSD's native tar","user":{"login":"aramisf","id":452174,"node_id":"MDQ6VXNlcjQ1MjE3NA==","avatar_url":"https://avatars3.githubusercontent.com/u/452174?v=4","gravatar_id":"","url":"https://api.github.com/users/aramisf","html_url":"https://github.com/aramisf","followers_url":"https://api.github.com/users/aramisf/followers","following_url":"https://api.github.com/users/aramisf/following{/other_user}","gists_url":"https://api.github.com/users/aramisf/gists{/gist_id}","starred_url":"https://api.github.com/users/aramisf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aramisf/subscriptions","organizations_url":"https://api.github.com/users/aramisf/orgs","repos_url":"https://api.github.com/users/aramisf/repos","events_url":"https://api.github.com/users/aramisf/events{/privacy}","received_events_url":"https://api.github.com/users/aramisf/received_events","type":"User","site_admin":false},"body":"Hello all,\r\n\r\nIn order to download and unpack node source files under OpenBSD it is necessary to execute the extraction in two steps. Since OpenBSD's `tar` is not integrated with `xz` (as GNU tar is), the `-J` option is not available.\r\n\r\nThis commit adds a function that figures this out and handles the proper file extraction under OpenBSD, removing  `GNU tar`'s dependency. The previous behaviour for other operating systems should stay untouched (more testing and feedback are welcome) (and maybe `aix` can also benefit from it, I don't know).\r\n\r\nThis PR does not handles the next issue, which is to compile certain versions of `Node.js` under OpenBSD. This issue, a bit more specific, is related to SSL libraries and requires more attention.\r\n\r\nI'm creating the pull request to ask you, if it makes sense to add this simple feature, even though the process is not entirely automated.\r\n\r\nDoes it?\r\n\r\n\r\n**Notes**:\r\n- I did not add any tests because I wasn't sure what exactly should be tested in this case;\r\n- OpenBSD versions previous to 6.4 were not tested.","created_at":"2018-12-31T16:41:08Z","updated_at":"2019-01-04T22:47:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db69876bcacfe38ff54545f82824bdf9e93f8412","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":479229176,"node_id":"MDU6TGFiZWw0NzkyMjkxNzY=","url":"https://api.github.com/repos/creationix/nvm/labels/OS:%20AIX","name":"OS: AIX","color":"f9d0c4","default":false},{"id":52887270,"node_id":"MDU6TGFiZWw1Mjg4NzI3MA==","url":"https://api.github.com/repos/creationix/nvm/labels/OS:%20FreeBSD%20/%20OpenBSD","name":"OS: FreeBSD / OpenBSD","color":"fad8c7","default":false},{"id":112625360,"node_id":"MDU6TGFiZWwxMTI2MjUzNjA=","url":"https://api.github.com/repos/creationix/nvm/labels/installing%20node","name":"installing node","color":"fef2c0","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/creationix/nvm/pulls/1972/commits","review_comments_url":"https://api.github.com/repos/creationix/nvm/pulls/1972/comments","review_comment_url":"https://api.github.com/repos/creationix/nvm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/creationix/nvm/issues/1972/comments","statuses_url":"https://api.github.com/repos/creationix/nvm/statuses/ef65b5a418740ed871f1da494d017d3f27ad6fc3","head":{"label":"aramisf:tar-on-openbsd","ref":"tar-on-openbsd","sha":"ef65b5a418740ed871f1da494d017d3f27ad6fc3","user":{"login":"aramisf","id":452174,"node_id":"MDQ6VXNlcjQ1MjE3NA==","avatar_url":"https://avatars3.githubusercontent.com/u/452174?v=4","gravatar_id":"","url":"https://api.github.com/users/aramisf","html_url":"https://github.com/aramisf","followers_url":"https://api.github.com/users/aramisf/followers","following_url":"https://api.github.com/users/aramisf/following{/other_user}","gists_url":"https://api.github.com/users/aramisf/gists{/gist_id}","starred_url":"https://api.github.com/users/aramisf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aramisf/subscriptions","organizations_url":"https://api.github.com/users/aramisf/orgs","repos_url":"https://api.github.com/users/aramisf/repos","events_url":"https://api.github.com/users/aramisf/events{/privacy}","received_events_url":"https://api.github.com/users/aramisf/received_events","type":"User","site_admin":false},"repo":{"id":162875826,"node_id":"MDEwOlJlcG9zaXRvcnkxNjI4NzU4MjY=","name":"nvm","full_name":"aramisf/nvm","private":false,"owner":{"login":"aramisf","id":452174,"node_id":"MDQ6VXNlcjQ1MjE3NA==","avatar_url":"https://avatars3.githubusercontent.com/u/452174?v=4","gravatar_id":"","url":"https://api.github.com/users/aramisf","html_url":"https://github.com/aramisf","followers_url":"https://api.github.com/users/aramisf/followers","following_url":"https://api.github.com/users/aramisf/following{/other_user}","gists_url":"https://api.github.com/users/aramisf/gists{/gist_id}","starred_url":"https://api.github.com/users/aramisf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aramisf/subscriptions","organizations_url":"https://api.github.com/users/aramisf/orgs","repos_url":"https://api.github.com/users/aramisf/repos","events_url":"https://api.github.com/users/aramisf/events{/privacy}","received_events_url":"https://api.github.com/users/aramisf/received_events","type":"User","site_admin":false},"html_url":"https://github.com/aramisf/nvm","description":"Node Version Manager - Simple bash script to manage multiple active node.js versions","fork":true,"url":"https://api.github.com/repos/aramisf/nvm","forks_url":"https://api.github.com/repos/aramisf/nvm/forks","keys_url":"https://api.github.com/repos/aramisf/nvm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aramisf/nvm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aramisf/nvm/teams","hooks_url":"https://api.github.com/repos/aramisf/nvm/hooks","issue_events_url":"https://api.github.com/repos/aramisf/nvm/issues/events{/number}","events_url":"https://api.github.com/repos/aramisf/nvm/events","assignees_url":"https://api.github.com/repos/aramisf/nvm/assignees{/user}","branches_url":"https://api.github.com/repos/aramisf/nvm/branches{/branch}","tags_url":"https://api.github.com/repos/aramisf/nvm/tags","blobs_url":"https://api.github.com/repos/aramisf/nvm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aramisf/nvm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aramisf/nvm/git/refs{/sha}","trees_url":"https://api.github.com/repos/aramisf/nvm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aramisf/nvm/statuses/{sha}","languages_url":"https://api.github.com/repos/aramisf/nvm/languages","stargazers_url":"https://api.github.com/repos/aramisf/nvm/stargazers","contributors_url":"https://api.github.com/repos/aramisf/nvm/contributors","subscribers_url":"https://api.github.com/repos/aramisf/nvm/subscribers","subscription_url":"https://api.github.com/repos/aramisf/nvm/subscription","commits_url":"https://api.github.com/repos/aramisf/nvm/commits{/sha}","git_commits_url":"https://api.github.com/repos/aramisf/nvm/git/commits{/sha}","comments_url":"https://api.github.com/repos/aramisf/nvm/comments{/number}","issue_comment_url":"https://api.github.com/repos/aramisf/nvm/issues/comments{/number}","contents_url":"https://api.github.com/repos/aramisf/nvm/contents/{+path}","compare_url":"https://api.github.com/repos/aramisf/nvm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aramisf/nvm/merges","archive_url":"https://api.github.com/repos/aramisf/nvm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aramisf/nvm/downloads","issues_url":"https://api.github.com/repos/aramisf/nvm/issues{/number}","pulls_url":"https://api.github.com/repos/aramisf/nvm/pulls{/number}","milestones_url":"https://api.github.com/repos/aramisf/nvm/milestones{/number}","notifications_url":"https://api.github.com/repos/aramisf/nvm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aramisf/nvm/labels{/name}","releases_url":"https://api.github.com/repos/aramisf/nvm/releases{/id}","deployments_url":"https://api.github.com/repos/aramisf/nvm/deployments","created_at":"2018-12-23T08:51:52Z","updated_at":"2018-12-23T08:51:55Z","pushed_at":"2019-01-04T22:38:11Z","git_url":"git://github.com/aramisf/nvm.git","ssh_url":"git@github.com:aramisf/nvm.git","clone_url":"https://github.com/aramisf/nvm.git","svn_url":"https://github.com/aramisf/nvm","homepage":"","size":2397,"stargazers_count":0,"watchers_count":0,"language":"Shell","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":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"creationix:master","ref":"master","sha":"206d503a21371a9e0ea38f0febb564e211cec6f8","user":{"login":"creationix","id":89353,"node_id":"MDQ6VXNlcjg5MzUz","avatar_url":"https://avatars3.githubusercontent.com/u/89353?v=4","gravatar_id":"","url":"https://api.github.com/users/creationix","html_url":"https://github.com/creationix","followers_url":"https://api.github.com/users/creationix/followers","following_url":"https://api.github.com/users/creationix/following{/other_user}","gists_url":"https://api.github.com/users/creationix/gists{/gist_id}","starred_url":"https://api.github.com/users/creationix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/creationix/subscriptions","organizations_url":"https://api.github.com/users/creationix/orgs","repos_url":"https://api.github.com/users/creationix/repos","events_url":"https://api.github.com/users/creationix/events{/privacy}","received_events_url":"https://api.github.com/users/creationix/received_events","type":"User","site_admin":false},"repo":{"id":612230,"node_id":"MDEwOlJlcG9zaXRvcnk2MTIyMzA=","name":"nvm","full_name":"creationix/nvm","private":false,"owner":{"login":"creationix","id":89353,"node_id":"MDQ6VXNlcjg5MzUz","avatar_url":"https://avatars3.githubusercontent.com/u/89353?v=4","gravatar_id":"","url":"https://api.github.com/users/creationix","html_url":"https://github.com/creationix","followers_url":"https://api.github.com/users/creationix/followers","following_url":"https://api.github.com/users/creationix/following{/other_user}","gists_url":"https://api.github.com/users/creationix/gists{/gist_id}","starred_url":"https://api.github.com/users/creationix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/creationix/subscriptions","organizations_url":"https://api.github.com/users/creationix/orgs","repos_url":"https://api.github.com/users/creationix/repos","events_url":"https://api.github.com/users/creationix/events{/privacy}","received_events_url":"https://api.github.com/users/creationix/received_events","type":"User","site_admin":false},"html_url":"https://github.com/creationix/nvm","description":"Node Version Manager - Simple bash script to manage multiple active node.js versions","fork":false,"url":"https://api.github.com/repos/creationix/nvm","forks_url":"https://api.github.com/repos/creationix/nvm/forks","keys_url":"https://api.github.com/repos/creationix/nvm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/creationix/nvm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/creationix/nvm/teams","hooks_url":"https://api.github.com/repos/creationix/nvm/hooks","issue_events_url":"https://api.github.com/repos/creationix/nvm/issues/events{/number}","events_url":"https://api.github.com/repos/creationix/nvm/events","assignees_url":"https://api.github.com/repos/creationix/nvm/assignees{/user}","branches_url":"https://api.github.com/repos/creationix/nvm/branches{/branch}","tags_url":"https://api.github.com/repos/creationix/nvm/tags","blobs_url":"https://api.github.com/repos/creationix/nvm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/creationix/nvm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/creationix/nvm/git/refs{/sha}","trees_url":"https://api.github.com/repos/creationix/nvm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/creationix/nvm/statuses/{sha}","languages_url":"https://api.github.com/repos/creationix/nvm/languages","stargazers_url":"https://api.github.com/repos/creationix/nvm/stargazers","contributors_url":"https://api.github.com/repos/creationix/nvm/contributors","subscribers_url":"https://api.github.com/repos/creationix/nvm/subscribers","subscription_url":"https://api.github.com/repos/creationix/nvm/subscription","commits_url":"https://api.github.com/repos/creationix/nvm/commits{/sha}","git_commits_url":"https://api.github.com/repos/creationix/nvm/git/commits{/sha}","comments_url":"https://api.github.com/repos/creationix/nvm/comments{/number}","issue_comment_url":"https://api.github.com/repos/creationix/nvm/issues/comments{/number}","contents_url":"https://api.github.com/repos/creationix/nvm/contents/{+path}","compare_url":"https://api.github.com/repos/creationix/nvm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/creationix/nvm/merges","archive_url":"https://api.github.com/repos/creationix/nvm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/creationix/nvm/downloads","issues_url":"https://api.github.com/repos/creationix/nvm/issues{/number}","pulls_url":"https://api.github.com/repos/creationix/nvm/pulls{/number}","milestones_url":"https://api.github.com/repos/creationix/nvm/milestones{/number}","notifications_url":"https://api.github.com/repos/creationix/nvm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/creationix/nvm/labels{/name}","releases_url":"https://api.github.com/repos/creationix/nvm/releases{/id}","deployments_url":"https://api.github.com/repos/creationix/nvm/deployments","created_at":"2010-04-15T17:47:47Z","updated_at":"2019-01-04T22:43:20Z","pushed_at":"2019-01-04T22:38:13Z","git_url":"git://github.com/creationix/nvm.git","ssh_url":"git@github.com:creationix/nvm.git","clone_url":"https://github.com/creationix/nvm.git","svn_url":"https://github.com/creationix/nvm","homepage":"","size":2334,"stargazers_count":31901,"watchers_count":31901,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3037,"mirror_url":null,"archived":false,"open_issues_count":271,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":3037,"open_issues":271,"watchers":31901,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/creationix/nvm/pulls/1972"},"html":{"href":"https://github.com/creationix/nvm/pull/1972"},"issue":{"href":"https://api.github.com/repos/creationix/nvm/issues/1972"},"comments":{"href":"https://api.github.com/repos/creationix/nvm/issues/1972/comments"},"review_comments":{"href":"https://api.github.com/repos/creationix/nvm/pulls/1972/comments"},"review_comment":{"href":"https://api.github.com/repos/creationix/nvm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/creationix/nvm/pulls/1972/commits"},"statuses":{"href":"https://api.github.com/repos/creationix/nvm/statuses/ef65b5a418740ed871f1da494d017d3f27ad6fc3"}},"author_association":"NONE"}}
{"actor":{"display_login":"ljharb"}}