Skip to content

Commit d75683a

Browse files
santiagofmfacebook-github-bot
authored andcommitted
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: #32029 Reviewed By: TheSavior Differential Revision: D30401213 Pulled By: yungsters fbshipit-source-id: 386ffeff15b5f371a452488ed078d3adebe0f211
1 parent 3e0d778 commit d75683a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/generate-specs.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ set -e
2727
THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
2828
TEMP_DIR=$(mktemp -d /tmp/react-native-codegen-XXXXXXXX)
2929
RN_DIR=$(cd "$THIS_DIR/.." && pwd)
30-
NODE_BINARY="${NODE_BINARY:-$(command -v node || true)}"
3130
USE_FABRIC="${USE_FABRIC:-0}"
3231

3332
# Find path to Node
3433
# shellcheck source=/dev/null
3534
source "$RN_DIR/scripts/find-node.sh"
3635

36+
NODE_BINARY="${NODE_BINARY:-$(command -v node || true)}"
37+
3738
cleanup () {
3839
set +e
3940
rm -rf "$TEMP_DIR"

0 commit comments

Comments
 (0)