From d377300f32d4d70cf1ac9119911dcdcb407d1980 Mon Sep 17 00:00:00 2001 From: David Cook Date: Fri, 17 Feb 2023 10:24:58 +1100 Subject: [PATCH] Support installations with homebrew (macOS) The officially recommended installation for Mac is via Homebrew. --- script/nodenv-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/nodenv-install.sh b/script/nodenv-install.sh index f8bcf33f58..f5d5f8cd28 100755 --- a/script/nodenv-install.sh +++ b/script/nodenv-install.sh @@ -9,7 +9,8 @@ if nodenv install --skip-existing; then echo "Correct Node version is installed." else echo "Upgrading node-build:" - git -C "$(nodenv root)"/plugins/node-build pull + # If homebrew (macOS) installed, try that first. Otherwise look in plugins directory. + brew upgrade node-build || git -C "$(nodenv root)"/plugins/node-build pull nodenv install fi