From e919d07068ec939125dafe82cb6920b754ac2e9b Mon Sep 17 00:00:00 2001 From: Brooke Kuhlmann Date: Thu, 29 Jul 2021 19:55:01 -0600 Subject: [PATCH] Added install Node function Necessary to ensure Node is installed using the latest stable release by default. --- bin/install_node_packages | 2 +- lib/installers.sh | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/install_node_packages b/bin/install_node_packages index 937678c..66ee4c7 100755 --- a/bin/install_node_packages +++ b/bin/install_node_packages @@ -10,7 +10,7 @@ IFS=$'\n\t' SCRIPT_PATH="$MAC_OS_CONFIG_PATH/bin/install_node_packages" if [[ -x "$SCRIPT_PATH" ]]; then - check_npm_install + install_node "$SCRIPT_PATH" else printf "WARNING: Node packages install script does not exist or is not executable.\n" diff --git a/lib/installers.sh b/lib/installers.sh index 164fbea..811fe0d 100644 --- a/lib/installers.sh +++ b/lib/installers.sh @@ -188,6 +188,15 @@ install_program() { } export -f install_program +# Installs Node. +# Parameters: None. +install_node() { + if ! command -v fnm > /dev/null; then + $(get_homebrew_bin_root)/fnm install --lts + fi +} +export -f install_node + # Installs Ruby. # Parameters: None. install_ruby() {