Add support for nodenv with xcode

Summary:
Hello!

I'm a fan of the *env family of version managers over the *vm family as I find them simpler and less obtrusive, but it seems that they don't currently work so well with react-native on OSX. See #4645

I've made a small addition to the xcode script that resolves the issue for me. Hopefully others will find this useful too :)

If I've not made the right move here, what is the correct way to get react-native projects building in xcode when the binary is not in the $PATH used by the script?

Cheers,
Louis
Closes https://github.com/facebook/react-native/pull/4801

Reviewed By: svcscm

Differential Revision: D2770726

Pulled By: androidtrunkagent

fb-gh-sync-id: 3b0f9e466549b3012a68c94738d2556173f4c21e
This commit is contained in:
Louis Pilfold 2015-12-17 14:09:40 -08:00 committed by facebook-github-bot-7
parent 29b735fdc1
commit a065510ec8
1 changed files with 5 additions and 0 deletions

View File

@ -41,6 +41,11 @@ elif [[ -x "$(command -v brew)" && -s "$(brew --prefix nvm)/nvm.sh" ]]; then
. "$(brew --prefix nvm)/nvm.sh"
fi
# Set up the nodenv node version manager if present
if [[ -x "$HOME/.nodenv/bin/nodenv" ]]; then
eval "$($HOME/.nodenv/bin/nodenv init -)"
fi
react-native bundle \
--entry-file index.ios.js \
--platform ios \