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

Ensure ::Bundler.load is called before enumerating dependencies #397

Merged
merged 1 commit into from
Sep 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/licensed/sources/bundler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,22 @@ def with_application_environment

# reset bundler to load from the current app's source path
::Bundler.reset!
::Bundler.load
end

# ensure the bundler environment is loaded before enumeration
::Bundler.load

yield
end
ensure
if backup
# restore bundler configuration
ENV.replace(backup)
::Bundler.reset!
::Bundler.load
end

# reload the bundler environment after enumeration
::Bundler.load
end

# Returns whether the current licensed execution is running ruby-packer
Expand Down