{"action":"created","issue":{"url":"https://api.github.com/repos/atom/apm/issues/360","labels_url":"https://api.github.com/repos/atom/apm/issues/360/labels{/name}","comments_url":"https://api.github.com/repos/atom/apm/issues/360/comments","events_url":"https://api.github.com/repos/atom/apm/issues/360/events","html_url":"https://github.com/atom/apm/pull/360","id":73853614,"number":360,"title":"Catch 404 not found case and quit stream before passing zlib empty file","user":{"login":"pusateri","id":90469,"avatar_url":"https://avatars.githubusercontent.com/u/90469?v=3","gravatar_id":"","url":"https://api.github.com/users/pusateri","html_url":"https://github.com/pusateri","followers_url":"https://api.github.com/users/pusateri/followers","following_url":"https://api.github.com/users/pusateri/following{/other_user}","gists_url":"https://api.github.com/users/pusateri/gists{/gist_id}","starred_url":"https://api.github.com/users/pusateri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pusateri/subscriptions","organizations_url":"https://api.github.com/users/pusateri/orgs","repos_url":"https://api.github.com/users/pusateri/repos","events_url":"https://api.github.com/users/pusateri/events{/privacy}","received_events_url":"https://api.github.com/users/pusateri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-07T05:42:46Z","updated_at":"2015-05-07T20:33:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/atom/apm/pulls/360","html_url":"https://github.com/atom/apm/pull/360","diff_url":"https://github.com/atom/apm/pull/360.diff","patch_url":"https://github.com/atom/apm/pull/360.patch"},"body":"Currently, if you try to download node for unsupported architecture/operating system, you get an exception because it passes a null stream to zlib to decompress.\r\n\r\nevents.js:72\r\n        throw er; // Unhandled 'error' event\r\n              ^\r\nError: incorrect header check\r\n    at Zlib._binding.onerror (zlib.js:296:17)\r\n\r\nThis change results in and error being printed:\r\ndownload not found: http://nodejs.org/dist/v0.10.35/node-v0.10.35-freebsd-x64.tar.gz\r\n"},"comment":{"url":"https://api.github.com/repos/atom/apm/issues/comments/100010700","html_url":"https://github.com/atom/apm/pull/360#issuecomment-100010700","issue_url":"https://api.github.com/repos/atom/apm/issues/360","id":100010700,"user":{"login":"kevinsawicki","id":671378,"avatar_url":"https://avatars.githubusercontent.com/u/671378?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinsawicki","html_url":"https://github.com/kevinsawicki","followers_url":"https://api.github.com/users/kevinsawicki/followers","following_url":"https://api.github.com/users/kevinsawicki/following{/other_user}","gists_url":"https://api.github.com/users/kevinsawicki/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinsawicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinsawicki/subscriptions","organizations_url":"https://api.github.com/users/kevinsawicki/orgs","repos_url":"https://api.github.com/users/kevinsawicki/repos","events_url":"https://api.github.com/users/kevinsawicki/events{/privacy}","received_events_url":"https://api.github.com/users/kevinsawicki/received_events","type":"User","site_admin":true},"created_at":"2015-05-07T20:33:29Z","updated_at":"2015-05-07T20:33:29Z","body":"> I’m not sure if the coffeescript version of request is used vs. the library version of request if this will act differently and I’m not sure how to test that.\r\n\r\nThere shouldn't be any differences and I don't think you need to test that.\r\n\r\n> If no download is available and the node used to run script/download-node.js is the same major version as specified in the call to downloadNode(), then fall back to copying it?\r\n\r\nYeah, that might be something work exploring, but it would be nice to just get downloads working on all platforms where Atom works.\r\n\r\n> I’m still figuring out how all of this works but the fact that node is running the script to download node seems like there could be a shortcut here under some circumstances.\r\n\r\napm ships with Atom where node can't be assumed to be installed so this is really just a tool to bundle node with Atom and apm so that apm works from the terminal.\r\n\r\nIt isn't intended that someone ever runs `npm install atom-package-manager` directly."}}