Fixed Node installer to detect Node and version

Ensures the latest version of Node is installed as managed by Fast
Node Manager (FNM). Behavior is similar to using Frum to manage Ruby
versions except FNM has the additional feature of computing latest
version instead.
This commit is contained in:
Brooke Kuhlmann
2022-12-24 07:35:00 -07:00
parent 5991bd6da6
commit 966b1596be

View File

@@ -201,8 +201,8 @@ export -f install_program
# Installs Node.
# Parameters: None.
install_node() {
if ! command -v fnm > /dev/null; then
$(get_homebrew_bin_root)/fnm install --lts
if [[ ! -x "$(command -v node)" ]]; then
"$(get_homebrew_bin_root)/fnm" install --latest
fi
}
export -f install_node