-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: This fix is ported from 0.64-stable. It moves the Node resolution script from react-native-xcode.sh to find-node.sh for re-use in the codegen. Changelog: [Codegen][Internal] Reviewed By: fkgozali Differential Revision: D27437216 fbshipit-source-id: ecb8a7a30411a709c095a0a34115b6dc48b99f1e
- Loading branch information
1 parent
a782b6f
commit 322e8f7
Showing
4 changed files
with
42 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
set -e | ||
|
||
# Define NVM_DIR and source the nvm.sh setup script | ||
[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm" | ||
|
||
if [[ -s "$HOME/.nvm/nvm.sh" ]]; then | ||
# shellcheck source=/dev/null | ||
. "$HOME/.nvm/nvm.sh" | ||
elif [[ -x "$(command -v brew)" && -s "$(brew --prefix nvm)/nvm.sh" ]]; then | ||
# shellcheck source=/dev/null | ||
. "$(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 -)" | ||
elif [[ -x "$(command -v brew)" && -x "$(brew --prefix nodenv)/bin/nodenv" ]]; then | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@hramos There is no$RN_DIR
variable defined in this script, which breaks build run from Xcode app. I assume you wanted to change it to$REACT_NATIVE_DIR
here?Ah, never mind, noticed that it was fixed in the latter commit.