summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2018-12-12 19:54:52 +0300
committerValentin Bartenev <vbart@nginx.com>2018-12-12 19:54:52 +0300
commitf51f95fa54b51a6c70939eba54c9823f3b941b87 (patch)
tree218a7f3813aecf0d1b10edfef3a72cafe7a25fdd
parentaafa4bbaf92cca2968eac19d74c59f7c7711b9dd (diff)
downloadunit-f51f95fa54b51a6c70939eba54c9823f3b941b87.tar.gz
unit-f51f95fa54b51a6c70939eba54c9823f3b941b87.tar.bz2
Node.js: fixed global install in some cases.
By default "npm install" switches to non-privileged user to run package scripts if it is invoked by root. As a result it may prevent node-gyp from writing to package directory and break installation of the module. To disable this switching the --unsafe-perm flag is added.
-rw-r--r--auto/modules/nodejs2
1 files changed, 1 insertions, 1 deletions
diff --git a/auto/modules/nodejs b/auto/modules/nodejs
index 443ee9d5..96ef6b98 100644
--- a/auto/modules/nodejs
+++ b/auto/modules/nodejs
@@ -161,7 +161,7 @@ install: ${NXT_NODE}-$NXT_NODE_INSTALL
${NXT_NODE}-install: ${NXT_NODE_TARBALL} \
$NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC
${NXT_NODE_EXPORTS} && \\
- ${NXT_NPM} install -g ${PWD}/${NXT_NODE_TARBALL}
+ ${NXT_NPM} install -g --unsafe-perm ${PWD}/${NXT_NODE_TARBALL}
${NXT_NODE}-uninstall:
${NXT_NPM} uninstall -g unit-http