Skip to content

Commit 3e7c310

Browse files
pastleofacebook-github-bot
authored andcommitted
add asdf-vm support in react-native-xcode.sh (#30111)
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
1 parent 8bef3b1 commit 3e7c310

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/find-node.sh

+9
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,12 @@ if [[ ! -x node && -d ${HOME}/.anyenv/bin ]]; then
3737
eval "$(anyenv init -)"
3838
fi
3939
fi
40+
41+
# Set up asdf-vm if present
42+
if [[ -f "$HOME/.asdf/asdf.sh" ]]; then
43+
# shellcheck source=/dev/null
44+
. "$HOME/.asdf/asdf.sh"
45+
elif [[ -x "$(command -v brew)" && -f "$(brew --prefix asdf)/asdf.sh" ]]; then
46+
# shellcheck source=/dev/null
47+
. "$(brew --prefix asdf)/asdf.sh"
48+
fi

0 commit comments

Comments
 (0)