mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
fix: Resolve NODE_BINARY *after* finding the path to node (#32029)
Summary: We want to resolve `NODE_BINARY` **after** `find-node.sh` runs and sets up any node version manager that we need to setup, otherwise `NODE_BINARY` is always undefined. ## Changelog [Internal] [Fixed] - Resolve NODE_BINARY after finding the right path to node Pull Request resolved: https://github.com/facebook/react-native/pull/32029 Reviewed By: TheSavior Differential Revision: D30401213 Pulled By: yungsters fbshipit-source-id: 386ffeff15b5f371a452488ed078d3adebe0f211
This commit is contained in:
@@ -27,13 +27,14 @@ set -e
|
||||
THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
|
||||
TEMP_DIR=$(mktemp -d /tmp/react-native-codegen-XXXXXXXX)
|
||||
RN_DIR=$(cd "$THIS_DIR/.." && pwd)
|
||||
NODE_BINARY="${NODE_BINARY:-$(command -v node || true)}"
|
||||
USE_FABRIC="${USE_FABRIC:-0}"
|
||||
|
||||
# Find path to Node
|
||||
# shellcheck source=/dev/null
|
||||
source "$RN_DIR/scripts/find-node.sh"
|
||||
|
||||
NODE_BINARY="${NODE_BINARY:-$(command -v node || true)}"
|
||||
|
||||
cleanup () {
|
||||
set +e
|
||||
rm -rf "$TEMP_DIR"
|
||||
|
||||
Reference in New Issue
Block a user