Skip to content

Commit

Permalink
- Fix failing to bundle in Release build with ndenv of anyenv by supp…
Browse files Browse the repository at this point in the history
…orting anyenv (facebook#22875)

Summary:
refer: https://github.com/riywo/anyenv

Changelog:
----------

[iOS] [Fixed] - Fix failing to bundle in Release build with ndenv of anyenv by supporting anyenv
Pull Request resolved: facebook#22875

Differential Revision: D13682773

Pulled By: hramos

fbshipit-source-id: 0baacc95bd215d4724ba418ff187d51b11126326
  • Loading branch information
januswel authored and facebook-github-bot committed Jan 16, 2019
1 parent ab0bd76 commit 093b4b1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/react-native-xcode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand Down

0 comments on commit 093b4b1

Please sign in to comment.