Skip to content

Commit

Permalink
fix: fix api usage on nodejs v8, fix https request path for gitlab ta…
Browse files Browse the repository at this point in the history
…rball
  • Loading branch information
3cp committed Mar 18, 2020
1 parent ad96bae commit eedd98a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/skeleton-dir.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ function getHash(tarball) {
const url = new URL(tarball);
return new Promise((resolve, reject) => {
const req = https.request({
hostname: url.hostname,
path: url.pathname,
search: url.search,
host: url.hostname,
path: url.pathname + url.search,
method: 'HEAD',
agent
}, res => {
Expand Down Expand Up @@ -112,10 +111,14 @@ module.exports = async function(supplier, {
_tmpFolder,
target => {
info('Fetching tarball ' + result.tarball);
const url = new URL(result.tarball);
return new Promise((resolve, reject) => {
https.get(
result.tarball,
{agent},
{
host: url.hostname,
path: url.pathname + url.search,
agent
},
res => {
if (res.statusCode == 200) {
res.pipe(gunzip())
Expand Down

0 comments on commit eedd98a

Please sign in to comment.