summaryrefslogtreecommitdiffstats
path: root/meta
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:50:09 +0000
commit21ace8b6202e906689619ebdb41e745a6c12975b (patch)
treeecb1ee9e3407d4d56f268c539867c32becf187b3 /meta
parent014278d3701675b3e0aa96eaa9cd3c93c4f68ee2 (diff)
downloadpoky-21ace8b6202e906689619ebdb41e745a6c12975b.tar.gz
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. (From OE-Core rev: a667cb9ed2dceb804b85d1a024e2619bc34d2681) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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() {
32} 32}
33 33
34npm_do_install() { 34npm_do_install() {
35 # changing the home directory to the working directory, the .npmrc will
36 # be created in this directory
37 export HOME=${WORKDIR}
35 mkdir -p ${NPM_INSTALLDIR}/ 38 mkdir -p ${NPM_INSTALLDIR}/
36 npm install --prefix ${D}${prefix} -g --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry 39 npm install --prefix ${D}${prefix} -g --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry
37 if [ -d ${D}${prefix}/etc ] ; then 40 if [ -d ${D}${prefix}/etc ] ; then