Added install Node function
Necessary to ensure Node is installed using the latest stable release by default.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user