Skip to content

Commit 7d5ae1d

Browse files
authored
Merge pull request #1 from yunfengsa/master
2 parents 44bfd83 + 5b9e707 commit 7d5ae1d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

modules/utils/npm.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,11 @@ async function fetchPackageInfo(packageName, log) {
7070

7171
log.debug('Fetching package info for %s from %s', packageName, infoURL);
7272

73-
const { hostname, pathname } = url.parse(infoURL);
73+
const { hostname, pathname, port } = url.parse(infoURL);
7474
const options = {
7575
agent: agent,
7676
hostname: hostname,
77+
port,
7778
path: pathname,
7879
headers: {
7980
Accept: 'application/json'
@@ -202,10 +203,11 @@ export async function getPackage(packageName, version, log) {
202203

203204
log.debug('Fetching package for %s from %s', packageName, tarballURL);
204205

205-
const { hostname, pathname } = url.parse(tarballURL);
206+
const { hostname, pathname, port } = url.parse(tarballURL);
206207
const options = {
207208
agent: agent,
208209
hostname: hostname,
210+
port,
209211
path: pathname
210212
};
211213

0 commit comments

Comments
 (0)