Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

with_clean_env does not replace original RUBYLIB environmental variable #3982

Closed
robertclancy opened this issue Sep 8, 2015 · 3 comments
Closed

Comments

@robertclancy
Copy link

with_clean_env does not reset the RUBYLIB environmental variable. This results in any calls to bundler in that environment will use the current bundler version. For example, I would expect

bundle _1.10.0_ exec ruby -e "require 'bundler'; Bundler.clean_system('bundle _1.9.1_ exec ruby -e \"require \\'bundler\\'; puts Bundler::VERSION\"')"

to return 1.9.1, but it returns 1.10.0.

@indirect
Copy link
Member

indirect commented Sep 8, 2015

The Bundler gem is not loaded from RUBYLIB... perhaps you can give an example that does use RUBYLIB for something?

@indirect
Copy link
Member

indirect commented Sep 8, 2015

Whoops; sorry, I misunderstood your example. This is a bug! Thanks for reporting it.

@indirect
Copy link
Member

indirect commented Sep 8, 2015

(This was broken by #2536, which changed from using RUBYOPT to using RUBYLIB, but did not update with_clean_env to clean RUBYLIB as well as RUBYOPT).

indirect added a commit that referenced this issue Sep 8, 2015
This still needs tests to ensure that `with_clean_env` does the right
thing.

refs #3982
homu added a commit that referenced this issue Sep 20, 2015
Clean RUBYLIB as well in `with_clean_env`

Fixes #3982.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants