From 966b1596be3cc92909fa1182b84788f0f886ad16 Mon Sep 17 00:00:00 2001 From: Brooke Kuhlmann Date: Sat, 24 Dec 2022 07:35:00 -0700 Subject: [PATCH] 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. --- lib/installers.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/installers.sh b/lib/installers.sh index 544b88f..7f4d603 100644 --- a/lib/installers.sh +++ b/lib/installers.sh @@ -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