Skip to content

Commit

Permalink
- Support fnm when detecting node binary (#32890)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
MoOx authored and facebook-github-bot committed Jan 26, 2022
1 parent 988fefc commit c9e4d34
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/find-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,10 @@ if [[ -x "$HOME/.volta/bin/node" ]]; then
export VOLTA_HOME="$HOME/.volta"
export PATH="$VOLTA_HOME/bin:$PATH"
fi

# Set up the fnm node version manager if present
if [[ -x "$HOME/.fnm/fnm" ]]; then
eval "$("$HOME/.fnm/fnm" env)"
elif [[ -x "$(command -v brew)" && -x "$(brew --prefix fnm)/bin/fnm" ]]; then
eval "$("$(brew --prefix fnm)/bin/fnm" env)"
fi

0 comments on commit c9e4d34

Please sign in to comment.