Skip to content

Commit

Permalink
Fix download timeout on node v20 install
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Felis <sebastian@silef.de>
  • Loading branch information
xemle committed Jul 31, 2023
1 parent cbb087a commit 15669fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/npm/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ var downloadFollowingRedirect = function(url, resolve, reject) {
https.get(url, { headers: { 'accept-encoding': 'gzip,deflate' } }, res => {
if (res.statusCode >= 300 && res.statusCode < 400) {
downloadFollowingRedirect(res.headers.location, resolve, reject);
res.resume()
} else if (res.statusCode >= 400) {
reject(new Error(`Unable to download '${url}' : ${res.statusCode}-'${res.statusMessage}'`));
res.resume()
} else {
const chunks = [];
res
Expand Down

0 comments on commit 15669fa

Please sign in to comment.