npmHooks.npmConfigHook: add npmRoot option
This commit is contained in:
parent
ac925d2c7a
commit
9117f01272
1 changed files with 8 additions and 0 deletions
|
@ -7,6 +7,10 @@ npmConfigHook() {
|
|||
export NIX_NODEJS_BUILDNPMPACKAGE=1
|
||||
export prefetchNpmDeps="@prefetchNpmDeps@"
|
||||
|
||||
if [ -n "${npmRoot-}" ]; then
|
||||
pushd "$npmRoot"
|
||||
fi
|
||||
|
||||
echo "Configuring npm"
|
||||
|
||||
export HOME="$TMPDIR"
|
||||
|
@ -105,6 +109,10 @@ npmConfigHook() {
|
|||
rm "$CACHE_MAP_PATH"
|
||||
unset CACHE_MAP_PATH
|
||||
|
||||
if [ -n "${npmRoot-}" ]; then
|
||||
popd
|
||||
fi
|
||||
|
||||
echo "Finished npmConfigHook"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue