From ff785dbcf5c464a4d850fa738e977702efd8abd3 Mon Sep 17 00:00:00 2001 From: Ernest Surudo Date: Tue, 12 Jul 2022 05:52:22 -0700 Subject: [PATCH] Use `NODE_BINARY` from `.xcode.env` when running packager from Xcode (#34121) Summary: Before this change, during the "Start Packager" Xcode build step that runs the packager, `packager.sh` was using my system node version and not the one from `nvm` that is meant to be used with the project. ## Changelog [iOS] [Fixed] - Use `NODE_BINARY` from `.xcode.env` when running packager from Xcode Pull Request resolved: https://github.com/facebook/react-native/pull/34121 Test Plan: Perform a build using Xcode and confirm that the packager is using the correct version of node. Reviewed By: cortinico Differential Revision: D37746951 Pulled By: cipolleschi fbshipit-source-id: de697c27fe86ce65e8e3646cb30309ecc7f6c247 --- scripts/launchPackager.command | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/launchPackager.command b/scripts/launchPackager.command index def21ee0101a91..efd1f2e4eed160 100755 --- a/scripts/launchPackager.command +++ b/scripts/launchPackager.command @@ -10,6 +10,10 @@ clear THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) +export PODS_ROOT="$THIS_DIR/../../../ios/Pods" +WITH_ENVIRONMENT="$THIS_DIR/xcode/with-environment.sh" +source $WITH_ENVIRONMENT + # export packager environment variables source "$THIS_DIR/.packager.env"