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
This commit is contained in:
enniel
2021-11-29 08:31:27 -08:00
committed by Facebook GitHub Bot
parent a596e98611
commit b399c2e3d1
+3
View File
@@ -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