mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-03-03 09:50:19 +00:00
workaround npm bug/"feature"
This commit is contained in:
@@ -103,11 +103,15 @@ echo ""
|
||||
rm -rf "${NODEJS_UNTAR}"
|
||||
|
||||
chown -R $(whoami) "$node_install_path/lib/node_modules/" 2>/dev/null || $sudo_cmd chown -R $(whoami) "$node_install_path/lib/node_modules/"
|
||||
chown $(whoami) ""$node_install_path"/bin/" 2>/dev/null || $sudo_cmd chown $(whoami) ""$node_install_path"/bin/"
|
||||
chown $(whoami) "$node_install_path"/bin/ 2>/dev/null || $sudo_cmd chown $(whoami) "$node_install_path"/bin/
|
||||
|
||||
mkdir -p $node_install_path/lib/node_modules 2> /dev/null || $sudo_cmd mkdir -p $node_install_path/lib/node_modules
|
||||
chown -R $(whoami) $node_install_path/lib/node_modules 2> /dev/null || $sudo_cmd chown -R $(whoami) $node_install_path/lib/node_modules
|
||||
|
||||
# By default, npm is stupid and uses any version of node in any path. Stop that.
|
||||
# npm config set scripts-prepend-node-path true
|
||||
"$node_install_path"/bin/node "$node_install_path"/bin/npm --scripts-prepend-node-path=true config set scripts-prepend-node-path true
|
||||
|
||||
#######
|
||||
# END #
|
||||
#######
|
||||
|
||||
Reference in New Issue
Block a user