Support installations with homebrew (macOS)

The officially recommended installation for Mac is via Homebrew.
This commit is contained in:
David Cook
2023-02-17 10:24:58 +11:00
parent b7a3f7263b
commit d377300f32

View File

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