From 335cdf6f46898e0db83a83978c9fbbb7c36460dd Mon Sep 17 00:00:00 2001 From: davidliu Date: Thu, 16 Oct 2025 22:48:46 +0900 Subject: [PATCH] Allow passing extra arguments in with-environment.sh Addresses #54140. This allows adding extra arguments when running a command with `with-environment.sh`. Tested by changing the "Bundle React Native code and images" build phase in the ReproducerApp template to execute with an extra argument like so: ``` /bin/sh -c "$WITH_ENVIRONMENT $REACT_NATIVE_XCODE index.example" ``` Can observe that the subsequent command picks up the extra argument. --- packages/react-native/scripts/xcode/with-environment.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/scripts/xcode/with-environment.sh b/packages/react-native/scripts/xcode/with-environment.sh index d2ddf3c02cab..5dc8f5bf5709 100755 --- a/packages/react-native/scripts/xcode/with-environment.sh +++ b/packages/react-native/scripts/xcode/with-environment.sh @@ -43,5 +43,5 @@ fi # Execute argument, if present if [ -n "$1" ]; then - "$1" + "$@" fi