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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user