node-github-download
node-github-download copied to clipboard
Fix: use github.com instead of nodeload.github.com for downloading zips
There seems to be an unavoidable SSL issue with downloading repo ZIPs from https://nodeload.github.com.
I've modified the code to instead download straight from https://github.com/$USER/$REPO/archive/$TAG.zip
(this uses the same link format as the "Download ZIP" on the website itself).
This more importantly was causing issues upstream with running truffle init
(see issue).
The only other changes where making extractZip
unzip directly to the target directory, and updating dependencies which were causing npm audit
issues.
This also avoids getting an
error: EXDEV
when trying to rename between devices. In other words, with respect to the test cases, trying to rename the relative './$TIMESTAMP/' directory to '/tmp/test-github-download/1/', for example, would fail withEXDEV
if/tmp
is a separate device mount on the machine (which is the case on my machine).
Please feel free to let me know if there should be any additional changes made to this PR. Or if anything needs any clarification.
Thanks!
-
dependency changes:
- update request@{2.12.0 -> 2.88.1}
- add strip-dirs@^3.0.0
-
dev dependency changes:
- update mocha@{2.x -> 6.x}
- update standard@{5.x -> 11.x}
Updated the travis.yml to use
- node.js versions -> { 6, 8, 10,
lts/*
(12),node
(latest = 14) } (see also this download graph) - os -> { Linux, OS X, Windows }
A friend of mine was experiencing this issue as well when using Truffle. I had no issues with
curl https://nodeload.github.com/
however he was getting SSH issues which preventing truffle from working
plz merge, this is a fix for the truffle unbox problem I'm having still