Added install Node function

Necessary to ensure Node is installed using the latest stable release
by default.
This commit is contained in:
Brooke Kuhlmann
2021-07-29 19:55:01 -06:00
parent 2e95c72d57
commit e919d07068
2 changed files with 10 additions and 1 deletions

View File

@@ -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"

View File

@@ -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() {