diff --git a/scripts/find-node.sh b/scripts/find-node.sh index d300276dd98113..11338d0a5d383c 100755 --- a/scripts/find-node.sh +++ b/scripts/find-node.sh @@ -60,3 +60,10 @@ if [[ -x "$HOME/.volta/bin/node" ]]; then export VOLTA_HOME="$HOME/.volta" export PATH="$VOLTA_HOME/bin:$PATH" fi + +# Set up the fnm node version manager if present +if [[ -x "$HOME/.fnm/fnm" ]]; then + eval "$("$HOME/.fnm/fnm" env)" +elif [[ -x "$(command -v brew)" && -x "$(brew --prefix fnm)/bin/fnm" ]]; then + eval "$("$(brew --prefix fnm)/bin/fnm" env)" +fi