Repository navigation
Catch 404 not found case and quit stream before passing zlib empty file - #360
Conversation
|
I believe this would fix #282 |
|
Yes, and it should make the problem obvious for the Linux arm guys too. 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. What are your thoughts on something like: In fact, it seems like the cp could be done first if the version matches and it if doesn’t, then do the download. 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. Thanks!
|
There was a problem hiding this comment.
Mind keeping the variable name as requestStream, having both res and resp variables is a little confusing.
There was a problem hiding this comment.
Agreed. I will redo it. Is there a better way to get feedback on a patch without doing a pull request?
Thanks,
Tom
On May 7, 2015, at 1:14 PM, Kevin Sawicki [email protected] wrote:
Mind keeping the variable as requestStream, having both res and resp variables is a little confusing.—
Reply to this email directly or view it on GitHub https://github.com/atom/apm/pull/360/files#r29873471.
There shouldn't be any differences and I don't think you need to test that.
Yeah, that might be something work exploring, but it would be nice to just get downloads working on all platforms where Atom works.
apm 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. It isn't intended that someone ever runs |
Catch 404 not found case and quit stream before passing zlib empty file
|
Thanks for fixing this. |
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.
events.js:72
throw er; // Unhandled 'error' event
^
Error: incorrect header check
at Zlib._binding.onerror (zlib.js:296:17)
This change results in and error being printed:
download not found: http://nodejs.org/dist/v0.10.35/node-v0.10.35-freebsd-x64.tar.gz