diff options
Diffstat (limited to 'scripts/lib/recipetool/create_npm.py')
-rw-r--r-- | scripts/lib/recipetool/create_npm.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lib/recipetool/create_npm.py b/scripts/lib/recipetool/create_npm.py index 7bb844cb0c..888aa2b00a 100644 --- a/scripts/lib/recipetool/create_npm.py +++ b/scripts/lib/recipetool/create_npm.py | |||
@@ -49,7 +49,7 @@ class NpmRecipeHandler(RecipeHandler): | |||
49 | 49 | ||
50 | def _shrinkwrap(self, srctree, localfilesdir, extravalues, lines_before): | 50 | def _shrinkwrap(self, srctree, localfilesdir, extravalues, lines_before): |
51 | try: | 51 | try: |
52 | runenv = dict(os.environ, PATH=tinfoil.config_data.getVar('PATH', True)) | 52 | runenv = dict(os.environ, PATH=tinfoil.config_data.getVar('PATH')) |
53 | bb.process.run('npm shrinkwrap', cwd=srctree, stderr=subprocess.STDOUT, env=runenv, shell=True) | 53 | bb.process.run('npm shrinkwrap', cwd=srctree, stderr=subprocess.STDOUT, env=runenv, shell=True) |
54 | except bb.process.ExecutionError as e: | 54 | except bb.process.ExecutionError as e: |
55 | logger.warn('npm shrinkwrap failed:\n%s' % e.stdout) | 55 | logger.warn('npm shrinkwrap failed:\n%s' % e.stdout) |
@@ -62,7 +62,7 @@ class NpmRecipeHandler(RecipeHandler): | |||
62 | lines_before.append('NPM_SHRINKWRAP := "${THISDIR}/${PN}/npm-shrinkwrap.json"') | 62 | lines_before.append('NPM_SHRINKWRAP := "${THISDIR}/${PN}/npm-shrinkwrap.json"') |
63 | 63 | ||
64 | def _lockdown(self, srctree, localfilesdir, extravalues, lines_before): | 64 | def _lockdown(self, srctree, localfilesdir, extravalues, lines_before): |
65 | runenv = dict(os.environ, PATH=tinfoil.config_data.getVar('PATH', True)) | 65 | runenv = dict(os.environ, PATH=tinfoil.config_data.getVar('PATH')) |
66 | if not NpmRecipeHandler.lockdownpath: | 66 | if not NpmRecipeHandler.lockdownpath: |
67 | NpmRecipeHandler.lockdownpath = tempfile.mkdtemp('recipetool-npm-lockdown') | 67 | NpmRecipeHandler.lockdownpath = tempfile.mkdtemp('recipetool-npm-lockdown') |
68 | bb.process.run('npm install lockdown --prefix %s' % NpmRecipeHandler.lockdownpath, | 68 | bb.process.run('npm install lockdown --prefix %s' % NpmRecipeHandler.lockdownpath, |
@@ -257,7 +257,7 @@ class NpmRecipeHandler(RecipeHandler): | |||
257 | if version != '*' and not '/' in version: | 257 | if version != '*' and not '/' in version: |
258 | pkgfullname += "@'%s'" % version | 258 | pkgfullname += "@'%s'" % version |
259 | logger.debug(2, "Calling getdeps on %s" % pkg) | 259 | logger.debug(2, "Calling getdeps on %s" % pkg) |
260 | runenv = dict(os.environ, PATH=d.getVar('PATH', True)) | 260 | runenv = dict(os.environ, PATH=d.getVar('PATH')) |
261 | fetchcmd = "npm view %s --json" % pkgfullname | 261 | fetchcmd = "npm view %s --json" % pkgfullname |
262 | output, _ = bb.process.run(fetchcmd, stderr=subprocess.STDOUT, env=runenv, shell=True) | 262 | output, _ = bb.process.run(fetchcmd, stderr=subprocess.STDOUT, env=runenv, shell=True) |
263 | data = self._parse_view(output) | 263 | data = self._parse_view(output) |