From dc3a42fe30adb719a0bda019b1340c9459c5305a Mon Sep 17 00:00:00 2001 From: Sho Ikeda Date: Wed, 30 May 2018 22:16:40 +0900 Subject: [PATCH] react-native-xcode.sh: Support Homebrew-installed nodenv As well as nvm. --- scripts/react-native-xcode.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/react-native-xcode.sh b/scripts/react-native-xcode.sh index 1e259741276241..7194c2a1856c5b 100755 --- a/scripts/react-native-xcode.sh +++ b/scripts/react-native-xcode.sh @@ -62,6 +62,8 @@ fi # Set up the nodenv node version manager if present if [[ -x "$HOME/.nodenv/bin/nodenv" ]]; then eval "$("$HOME/.nodenv/bin/nodenv" init -)" +elif [[ -x "$(command -v brew)" && -x "$(brew --prefix nodenv)/bin/nodenv" ]]; then + eval "$("$(brew --prefix nodenv)/bin/nodenv" init -)" fi [ -z "$NODE_BINARY" ] && export NODE_BINARY="node"