Allow passing extra arguments in with-environment.sh#54166
Conversation
Addresses react#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 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! |
|
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. |
|
Hi! We would really like to be able to pass arguments to the command. Our use case is with sentry which specifies this in there xcode build phase documentation: where the sentry script As we do not use the default path, we would like to specify our own. But, because the argument is not passed to the sentry script the default is used, and we are unable to use sentry without patch. So in our case passing one argument would be sufficient, we would not need an arbitrary amount Thanks in advance |
|
Hi @cipolleschi Is there any progress on this? I was just hit by this trying to update RN to 0.81.1. I'm also using Sentry so my problem is probably the same as reported by @simon-thuresson-md here: |
|
This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
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.