-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Refactor argument execution in with-environment.sh to support multipl… #54148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Refactor argument execution in with-environment.sh to support multipl… #54148
Conversation
…e arguments Summary: Updated the script to execute all provided arguments instead of just the first one, enhancing its flexibility.
Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
@andrewdacenko has imported this pull request. If you are a Meta employee, you can view this in D84637163. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review automatically exported from Phabricator review in Meta.
Hi @cortinico 👋 |
Could you clarify what's your use case @vishalvadodariya ? Why do you need this change now? |
Hi @cortinico , I have raised PR to resolve the Issue #54140. |
Resolving #54140
Summary:
Fixed argument passing issue in
with-environment.sh
script that prevented passing arguments to subcommands in iOS builds. The script was only executing the first argument ("$1"
) instead of all provided arguments ("$@"
), causing build failures when users tried to pass custom entry file arguments toreact-native-xcode.sh
.Problem: Users could not pass arguments like
index.ts
to the React Native bundling script throughwith-environment.sh
, resulting in "No such file or directory" errors during iOS builds.Solution: Changed line 46 in
with-environment.sh
from"$1"
to"$@"
to properly pass all arguments to the subcommand.Changelog:
[IOS] [FIXED] - Fixed argument passing in with-environment.sh script to support passing arguments to subcommands
Test Plan:
index.ts
argument:The fix resolves the issue described in #54140 where users cannot pass custom entry file arguments to the React Native bundling process in iOS builds.
Files Changed:
packages/react-native/scripts/xcode/with-environment.sh
- Updated line 46 to use"$@"
instead of"$1"
Breaking Changes:
None - this change maintains full backward compatibility.
Additional Notes:
This is a minimal, safe fix that addresses the exact issue reported in the GitHub issue. The change allows users to pass custom entry file arguments to the React Native bundling process, which is essential for projects that use non-standard entry points.