summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-12-20 09:51:21 +1300
committerPaul Eggleton <paul.eggleton@linux.intel.com>2017-02-07 09:39:50 +1300
commit28d689f8556d3ac51e44764fe4c75a6159766107 (patch)
tree82c433d941a08650c59e07e18734eeba25fa3f1a
parentb3a74335e1f9701ce2d6217080800baf3a61acb4 (diff)
downloadopenembedded-core-contrib-28d689f8556d3ac51e44764fe4c75a6159766107.tar.gz
openembedded-core-contrib-28d689f8556d3ac51e44764fe4c75a6159766107.tar.bz2
openembedded-core-contrib-28d689f8556d3ac51e44764fe4c75a6159766107.zip
classes/npm: set HOME during do_install
In do_compile we set HOME so that ~/.npm* only get created in the work directory; we need to do the same in do_install as well or they'll go into the user's home directory which we do not want. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r--meta/classes/npm.bbclass3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass
index 1c778a7637..c5380405af 100644
--- a/meta/classes/npm.bbclass
+++ b/meta/classes/npm.bbclass
@@ -32,6 +32,9 @@ npm_do_compile() {
}
npm_do_install() {
+ # changing the home directory to the working directory, the .npmrc will
+ # be created in this directory
+ export HOME=${WORKDIR}
mkdir -p ${NPM_INSTALLDIR}/
npm install --prefix ${D}${prefix} -g --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry
if [ -d ${D}${prefix}/etc ] ; then