Skip to content

Commit c9e4d34

Browse files
MoOxfacebook-github-bot
authored andcommitted
- Support fnm when detecting node binary (#32890)
Summary: Since 0.64, local code in `Bundle React Native code and images` step for iOS is not enough anymore. This add support for [fnm](https://github.com/Schniz/fnm) that is widely used this days. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [General] [Added] - Support fnm when detecting node binary Pull Request resolved: #32890 Test Plan: I use fnm & it's working. Tested this code via patch-package. Reviewed By: christophpurrer Differential Revision: D33766842 Pulled By: cortinico fbshipit-source-id: 77bbda2c7742de9ec64e6faa9a3526d3997bb4aa
1 parent 988fefc commit c9e4d34

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/find-node.sh

+7
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,10 @@ if [[ -x "$HOME/.volta/bin/node" ]]; then
6060
export VOLTA_HOME="$HOME/.volta"
6161
export PATH="$VOLTA_HOME/bin:$PATH"
6262
fi
63+
64+
# Set up the fnm node version manager if present
65+
if [[ -x "$HOME/.fnm/fnm" ]]; then
66+
eval "$("$HOME/.fnm/fnm" env)"
67+
elif [[ -x "$(command -v brew)" && -x "$(brew --prefix fnm)/bin/fnm" ]]; then
68+
eval "$("$(brew --prefix fnm)/bin/fnm" env)"
69+
fi

0 commit comments

Comments
 (0)