mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-03-03 18:00:18 +00:00
bugfix / switch installed versions
This commit is contained in:
@@ -81,9 +81,23 @@ set -u
|
||||
# Install node #
|
||||
##################
|
||||
|
||||
common_node_home="${HOME}/.local/opt/node"
|
||||
new_node_home="${HOME}/.local/opt/node-v${WEBI_VERSION}"
|
||||
new_node="${HOME}/.local/opt/node-v${WEBI_VERSION}/bin/node"
|
||||
|
||||
update_node_home() {
|
||||
rm -rf "$common_node_home"
|
||||
ln -s "$new_node_home" "$common_node_home"
|
||||
|
||||
# TODO get better output from pathman / output the path to add as return to webi bootstrap
|
||||
webi_path_add "$common_node_home/bin"
|
||||
}
|
||||
|
||||
if [ -x "$new_go_home/bin/go" ]; then
|
||||
update_node_home
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Test for existing version
|
||||
set +e
|
||||
cur_node="$(command -v node)"
|
||||
@@ -130,8 +144,7 @@ popd 2>&1 >/dev/null
|
||||
# Update PATH #
|
||||
###################
|
||||
|
||||
# TODO get better output from pathman / output the path to add as return to webi bootstrap
|
||||
webi_path_add "$new_node_home/bin"
|
||||
update_node_home
|
||||
|
||||
echo "Installed 'node' and 'npm'"
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user