From b399c2e3d10fa521dbec87243d3e96f6bca7df1e Mon Sep 17 00:00:00 2001 From: enniel Date: Mon, 29 Nov 2021 08:28:43 -0800 Subject: [PATCH] CLI: export packager environment variables (#32666) Summary: Custom metro port not working without exporting variables from `.packager.env` ## Changelog [General] [Fixed] - Fix support for custom port Pull Request resolved: https://github.com/facebook/react-native/pull/32666 Test Plan: run `react-native run-android --port=8082` and `react-native run-ios --port=8082` Reviewed By: yungsters Differential Revision: D32694233 Pulled By: cortinico fbshipit-source-id: 42e803d56b83608024b901d2a3024733ed7099b7 --- scripts/launchPackager.command | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/launchPackager.command b/scripts/launchPackager.command index c4c783323ca..d3fc4f42aed 100755 --- a/scripts/launchPackager.command +++ b/scripts/launchPackager.command @@ -10,6 +10,9 @@ clear THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) +# export packager environment variables +source "$THIS_DIR/.packager.env" + if [ -n "${RCT_PACKAGER_LOGS_DIR}" ] ; then echo "Writing logs to $RCT_PACKAGER_LOGS_DIR" # shellcheck source=/dev/null