Skip to content
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

Overwrite envfile variables with command-line environment variable #67

Closed
yachaka opened this issue Jan 2, 2017 · 2 comments
Closed

Comments

@yachaka
Copy link

yachaka commented Jan 2, 2017

Hello,
Thanks for the package, works great following README instructions.
I had a question : is it possible to overwrite the envfile variables using command-line env variables ?
For example if I had an envfile as follow :

DEFAULT_USERNAME=mickael@github.com

I might for testing want to run the app with a different default username, but only for this run, so I would like to be able to run DEFAULT_USERNAME=tmp_username@github.com react-native run-platform.
Looking at the code, I guess this is not achievable right now with this package ; how would you achieve it ? Do you plan to add this capability to the build.gradle file and the ruby file ?

@alreadysabbir
Copy link

Also wanted to ask the same

@pedro
Copy link
Contributor

pedro commented Dec 5, 2017

Interesting! I think the stuff in .env should always take precedence. If we allow overrides we might see unexpected conflicts like USER, which is set by the shell itself.

For quick tweaks I normally leave commented stuff in my env, like:

# VAR=1
VAR=2

It's quick enough to toggle, and you can easily see what's going on.

Hope this helps, let me know of any other feedback in this front!

Thanks

@pedro pedro closed this as completed Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants