projects
/
webi-installers
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c56bd04
)
workaround npm bug/"feature"
author
AJ ONeal
<aj@therootcompany.com>
Mon, 27 Apr 2020 06:42:26 +0000
(06:42 +0000)
committer
AJ ONeal
<aj@therootcompany.com>
Mon, 27 Apr 2020 06:42:26 +0000
(06:42 +0000)
node/node.bash
patch
|
blob
|
history
diff --git
a/node/node.bash
b/node/node.bash
index 13ce55821e2812d0bd242a025547b1db009976d9..33a9abb7e0e9061ef32828c8c8ace1f77e48318f 100644
(file)
--- a/
node/node.bash
+++ b/
node/node.bash
@@
-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/"
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
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 #
#######
#######
# END #
#######