Skip to content

Commit

Permalink
add asdf-vm support in react-native-xcode.sh (#30111)
Browse files Browse the repository at this point in the history
Summary:
About asdf-vm: https://asdf-vm.com/

This PR add [asdf-vm](https://asdf-vm.com/) support to `find-node.sh` for `scripts/react-native-xcode.sh` in `Bundle React Native code and images` build phrase and potentially other scripts using `find-node.sh` to get executable nodejs

## Changelog

[iOS] [Added] - add asdf-vm support in find-node.sh

Pull Request resolved: #30111

Test Plan: Xcode is able to complete `Bundle React Native code and images` build phrase without errors when node is installed by asdf-vm

Reviewed By: yungsters

Differential Revision: D31064080

Pulled By: charlesbdudley

fbshipit-source-id: aa73620fc39027c58c9cdfbb554cd5698b917850
  • Loading branch information
pastleo authored and facebook-github-bot committed Sep 28, 2021
1 parent 8bef3b1 commit 3e7c310
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/find-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,12 @@ if [[ ! -x node && -d ${HOME}/.anyenv/bin ]]; then
eval "$(anyenv init -)"
fi
fi

# Set up asdf-vm if present
if [[ -f "$HOME/.asdf/asdf.sh" ]]; then
# shellcheck source=/dev/null
. "$HOME/.asdf/asdf.sh"
elif [[ -x "$(command -v brew)" && -f "$(brew --prefix asdf)/asdf.sh" ]]; then
# shellcheck source=/dev/null
. "$(brew --prefix asdf)/asdf.sh"
fi

0 comments on commit 3e7c310

Please sign in to comment.