X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=node%2Finstall.sh;h=add502255560d7ec12a4334a99127157be05f64f;hb=1f0e9e5143e81b48c880dae234a5df56ba9c6a35;hp=f2c259c801152e02d988e79cfea9f26ae6cbed8a;hpb=5e0debf4c54c1e55476c1bc533c26db2b54d2f77;p=webi-installers%2F.git diff --git a/node/install.sh b/node/install.sh index f2c259c..add5022 100644 --- a/node/install.sh +++ b/node/install.sh @@ -1,9 +1,16 @@ #!/bin/bash +# "This is too simple" you say! "Where is the magic!?" you ask. +# There is no magic! +# The custom functions for node are here. +# The generic functions - version checks, download, extract, etc - are here: +# - https://github.com/webinstall/packages/branches/master/_webi/template.sh + set -e set -u pkg_cmd_name="node" +#WEBI_SINGLE="" pkg_get_current_version() { # 'node --version' has output in this format: @@ -27,6 +34,9 @@ pkg_link() { # ln -s "$HOME/.local/opt/node-v14.4.0" "$HOME/.local/opt/node" ln -s "$pkg_src" "$pkg_dst" + + # Node bugfix: use the correct version of node, even if PATH has a conflict + "$pkg_src"/bin/node "$pkg_src"/bin/npm config set scripts-prepend-node-path=true } pkg_done_message() {