diff --git a/scripts/react-native-xcode.sh b/scripts/react-native-xcode.sh index e7bbec599b9..8bb6caaf959 100755 --- a/scripts/react-native-xcode.sh +++ b/scripts/react-native-xcode.sh @@ -80,6 +80,14 @@ elif [[ -x "$(command -v brew)" && -x "$(brew --prefix nodenv)/bin/nodenv" ]]; t eval "$("$(brew --prefix nodenv)/bin/nodenv" init -)" fi +# Set up the ndenv of anyenv if preset +if [[ ! -x node && -d ${HOME}/.anyenv/bin ]]; then + export PATH=${HOME}/.anyenv/bin:${PATH} + if [[ "$(anyenv envs | grep -c ndenv )" -eq 1 ]]; then + eval "$(anyenv init -)" + fi +fi + [ -z "$NODE_BINARY" ] && export NODE_BINARY="node" [ -z "$NODE_ARGS" ] && export NODE_ARGS=""