From eb53b927ff59aa19cf28bc46beb9f9a185a59990 Mon Sep 17 00:00:00 2001 From: Brendan Le Foll Date: Mon, 29 Feb 2016 14:27:43 +0000 Subject: npm: in cases where shrinkwrap resolved a git URL, ignore it and grab dist.tarball npm-shrinkwrap will sometimes resolve a git URL which instead of a http url, in this case go and grab the dist.tarball via npm instead of using the resolved URL. Signed-off-by: Brendan Le Foll Signed-off-by: Richard Purdie --- lib/bb/fetch2/npm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/bb') diff --git a/lib/bb/fetch2/npm.py b/lib/bb/fetch2/npm.py index 7d5e8913fb..46644f1bba 100644 --- a/lib/bb/fetch2/npm.py +++ b/lib/bb/fetch2/npm.py @@ -175,7 +175,7 @@ class Npm(FetchMethod): def _getshrinkeddependencies(self, pkg, data, version, d, ud, lockdown, manifest): logger.debug(2, "NPM shrinkwrap file is %s" % data) outputurl = "invalid" - if ('resolved' not in data): + if ('resolved' not in data) or (not data['resolved'].startswith('http')): # will be the case for ${PN} fetchcmd = "npm view %s@%s dist.tarball --registry %s" % (pkg, version, ud.registry) logger.debug(2, "Found this matching URL: %s" % str(fetchcmd)) -- cgit 1.2.3-korg