Hm, it doesn't work well in my case.
1. Let's say the original PATH is "/bin".
2. Then I run `bundle exec rspec`:
- ENV's PATH is set to "/ruby/gems/bin:/bin".
- ORIGINAL_ENV's PATH is set to "/bin"
3. The "rspec" binary is executed, bundler is required again:
- ENV's PATH is set to "/ruby/gems/bin:/bin" (nothing added because of "uniq")
- ORIGINAL_ENV's PATH is set to "/ruby/gems/bin:/bin"
At that point obviously there's no way to restore the original environment, because it's already overwritten.
Is this a general issue, or something wrong with my setup?
Regards,
Reto