1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Fix Bundler deprecation warning in rake features (#2063)

This fixes the following warning when running `rake features` using the
latest version of Bundler (2.1.4):

```
[DEPRECATED] `Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`.
If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env`
(called at spec/support/test_app.rb:194)
```
This commit is contained in:
Matt Brictson 2020-06-13 20:44:32 -07:00 committed by GitHub
parent e5600d7c85
commit 9fbb73b5f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -191,6 +191,11 @@ module TestApp
def with_clean_bundler_env(&block)
return yield unless defined?(Bundler)
Bundler.with_clean_env(&block)
if Bundler.respond_to?(:with_unbundled_env)
Bundler.with_unbundled_env(&block)
else
Bundler.with_clean_env(&block)
end
end
end