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

don't overwrite already existing env vars #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ccutrer
Copy link
Contributor

@ccutrer ccutrer commented Oct 22, 2015

this is helpful if your local env is different than real travis

for example, in real travis you have TEST_DB_USERNAME=postgres
in your travis.yml, but locally you have TEST_DB_USERNAME=cody
since you don't want (or have) a postgres superuser named postgres

this is helpful if your local env is different than real travis

for example, in real travis you have TEST_DB_USERNAME=postgres
in your travis.yml, but locally you have TEST_DB_USERNAME=cody
since you don't want (or have) a postgres superuser named postgres
@grosser
Copy link
Owner

grosser commented Oct 22, 2015

there are things like RUBY_VERSION / BUNDLE_GEMFILE that need to changed even if they are currently set in your environment ... and I think guessing which ones will break an equal but opposite amount of usecases ;)

maybe a wwtd-ignore: section ?

@ccutrer
Copy link
Contributor Author

ccutrer commented Oct 22, 2015

BUNDLE_GEMFILE will be unset by Bundler.with_clean_env

@grosser
Copy link
Owner

grosser commented Oct 22, 2015

maybe whitelist TEST_DB_USERNAME / other known ones only ?

@ccutrer
Copy link
Contributor Author

ccutrer commented Oct 22, 2015

hmm, I think you're saying that the env going to the sh command might include things like RUBY_VERSION from rvm/wwtd itself that rvm needs to execute properly; my intent is to only apply this logic for things that came from the travis.yml. what would you think to moving the filtering up to Run#add_env_from_config?

@grosser
Copy link
Owner

grosser commented Oct 23, 2015

that would be a nicer place ... I still think there might be things you want to have overwritten ... so a explicit whitelist would be nice ... I think travis ignores extra keys, so they can live in the .travis.yml or be passed via arguments

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

Successfully merging this pull request may close these issues.

2 participants