aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-02-07 09:45:40 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-07 14:48:55 +0000
commita667cb9ed2dceb804b85d1a024e2619bc34d2681 (patch)
treef69cec507047f09322bab08f2408ea3e776090cf /meta/classes
parentc966dee6208d3b7a9fa3c1b8aa1266058dcb65ff (diff)
downloadopenembedded-core-contrib-a667cb9ed2dceb804b85d1a024e2619bc34d2681.tar.gz
openembedded-core-contrib-a667cb9ed2dceb804b85d1a024e2619bc34d2681.tar.bz2
openembedded-core-contrib-a667cb9ed2dceb804b85d1a024e2619bc34d2681.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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-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