-
Notifications
You must be signed in to change notification settings - Fork 468
feat: add ability to inject arbitrary environment variables #354
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
Conversation
Would love to see this merged into master. Thanks @palmerc! |
Agreed. I've tried starting ios-deploy in the |
If you look at what Xcode passes to the debugserver you'll see the that this environment variables are handled this way. I wish they'd accept this onto master |
@shazron this seems like something I should be able to get on master. Any particular reason you can't accept the PR? |
No reason, I haven't gotten around to testing the PR. Testing now. |
Tested with these, and they work well, I can see the env vars during runtime in my app: I am adding a review note above for two changes that are needed (docs) |
src/ios-deploy/ios-deploy.m
Outdated
@" -c, --detect only detect if the device is connected\n" | ||
@" -b, --bundle <bundle.app> the path to the app bundle to be installed\n" | ||
@" -a, --args <args> command line arguments to pass to the app when launching it\n" | ||
@" -s, --envs <envs> environment variables to pass to the app when launching it\n" |
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.
Need to probably mention that key value pairs need to be space separated, e.g.
FOO=BAR BAZ=FAZ
Please also add an example in the Examples
section of the README.md
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.
In summary:
- Update the CLI help text to show what the value or values needed (space separated key value pairs)
- Update the README.md with an example of how to use the command in the
Examples
section
@shazron I think that it should match your requested changes now. |
Tip for next time - don't squash your changes. It makes it easier for me to review any new changes since I last re-tested. If squashed, I would have to re-test the whole thing again if I doubt its veracity, but in this case through visual inspection from the previous it looks fine. GH has a way to squash it neatly when I merge it in. |
Hey! Sorry for bothering, but is there any chance to know when this might get in the release? |
Sometimes you need to pass environment variables to the remote debugging session just like Xcode. I added the ability to do this.