-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Allow passing extra arguments in with-environment.sh #54166
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?
Conversation
Addresses facebook#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.
Hi @davidliu! 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 [email protected]. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Hi @davidliu thanks for the PR. There are some security concerns involved in this change. We are not sure that allowing to execute a command with an arbitrary set of arguments is safe. Can you expand a little bit more on your use case? Why do you need to run the script with extra arguments? |
Hi @cipolleschi, as outlined in #54140, my personal usecase is for the It's not a big issue or anything though, just a minor inconvenience. I'm not really knowledgeable about the security issues here, but if there's actual concerns, feel free to close the PR. |
Worth mention that without @davidliu's suggested change I wasn't able to run app on physical devices even being in the same network as described here. So, I'm not sure what should be the final fix in case this PR get's closed without any other suggested change. |
Summary:
Addresses #54140.
This allows adding extra arguments when running a command with
with-environment.sh
.Changelog:
[IOS|] [CHANGED] - Allow passing extra arguments in with-environment.sh
Test Plan:
Tested by changing the "Bundle React Native code and images" build phase in the ReproducerApp template to execute with an extra argument like so:
Can observe that the subsequent command picks up the extra argument.
Also tested building normally, without the extra argument, works as expected.