summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2/npm.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-09-06 10:57:28 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-06 10:35:04 +0100
commit0ddaf725e5a0675b252b7f80b1706370e478175b (patch)
treeeca7629532bee5cc9731bf0993169e01fb57d5b0 /lib/bb/fetch2/npm.py
parentdc756510a95f88b192352be6fcd1d5d77852c348 (diff)
downloadbitbake-contrib-0ddaf725e5a0675b252b7f80b1706370e478175b.tar.gz
fetch2/npm: explicitly specify workdir
We were downloading into the current directory here, which is fine if that current directory can be expected to be the right place - but that's not true when called from recipetool within OE. We should explicitly specify the directory to run the command in and then there won't be a problem. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/npm.py')
-rw-r--r--lib/bb/fetch2/npm.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bb/fetch2/npm.py b/lib/bb/fetch2/npm.py
index b26ac22ef..65ccb0dd2 100644
--- a/lib/bb/fetch2/npm.py
+++ b/lib/bb/fetch2/npm.py
@@ -102,7 +102,8 @@ class Npm(FetchMethod):
def _runwget(self, ud, d, command, quiet):
logger.debug(2, "Fetching %s using command '%s'" % (ud.url, command))
bb.fetch2.check_network_access(d, command)
- runfetchcmd(command, d, quiet)
+ dldir = d.getVar("DL_DIR", True)
+ runfetchcmd(command, d, quiet, workdir=dldir)
def _unpackdep(self, ud, pkg, data, destdir, dldir, d):
file = data[pkg]['tgz']