Skip to contentSkip to conversation

scripts/lib/recipetool/create_npm.py: Fix npm uri_replace

PATCH New Davis, Michael 1 participant 1 message May 19, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/lib/recipetool/create_npm.py: Fix npm uri_replace

Currently bitbakes uri_replace compares "npm://*/*" to "npm://registry.npmjs.org". The lack of the second / causes this to always fail. This results in things like mirror tarballs not functioning.
This patch adds in a / to the link generated by npm://registry.npmjs.org.

---
 scripts/lib/recipetool/create_npm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/lib/recipetool/create_npm.py +1 -1
index cb8f338..b54f539 100644
@@ -126,7 +126,7 @@ class NpmRecipeHandler(RecipeHandler):
                     for dep, depdata in deplist.items():
                         version = depdata.get('version', None)
                         if version:
-                            url = 'npm://registry.npmjs.org;name=%s;version=%s;subdir=node_modules/%s' % (dep, version, dep)
+                            url = 'npm://registry.npmjs.org/;name=%s;version=%s;subdir=node_modules/%s' % (dep, version, dep)
                             scriptutils.fetch_uri(d, url, srctree)
                             src_uri.append(url)
                             changed = True
Signature · 1 line
2.9.4