Skip to content

Commit

Permalink
Merge pull request alexch#131 from fukayatsu/fix-bundler-2.1-deprecat…
Browse files Browse the repository at this point in the history
…ion-warning

Fix bundler 2.1 deprecation warning
  • Loading branch information
alexch authored Jan 4, 2023
2 parents ba8f319 + 51fbe0f commit 36f2d23
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/rerun/notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@ def icon_dir
end

def with_clean_env
if defined?(Bundler)
Bundler.with_clean_env do
yield
end
return yield unless defined?(Bundler)

if Bundler.respond_to?(:with_unbundled_env)
Bundler.with_unbundled_env { yield }
else
yield
# Deprecated on Bundler 2.1
Bundler.with_clean_env { yield }
end
end
end
Expand Down

0 comments on commit 36f2d23

Please sign in to comment.