From: Paul Eggleton Date: Mon, 6 Feb 2017 20:45:40 +0000 (+1300) Subject: classes/npm: set HOME during do_install X-Git-Tag: uninative-1.5~391 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=a667cb9ed2dceb804b85d1a024e2619bc34d2681;p=openembedded-core.git 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 Signed-off-by: Richard Purdie --- 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