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

Conversation

jonabc
Copy link
Contributor

@jonabc jonabc commented Sep 10, 2021

closes #396

The bug in the linked issue comes from installing licensed with gem install rather than being listed in a Gemfile, and not running it through bundle exec licensed. In that scenario ::Bundler.load was never called and as a result ::Bundler.configure wasn't either. In 3.2.0 and prior releases, this was accounted for in an equality check against ENV["BUNDLE_GEMFILE"] which would have been nil, triggering the configure call.

As a fix, the source now always calls ::Bundler.load before enumerating dependencies. The call is a no-op if the runtime is already loaded, so unless or until Bundler changes it's implementation this should be a safe change

this is a no-op when bundler is already loaded
@jonabc jonabc merged commit d66f8dd into master Sep 10, 2021
@jonabc jonabc deleted the ensure-bundler-loaded branch September 10, 2021 04:38
jonabc added a commit that referenced this pull request Sep 10, 2021
## 3.2.2

2021-09-09

### Fixed

- Bundler source works properly again when used outside of `bundle exec` (#397)
@jonabc jonabc mentioned this pull request Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Could not find any gem for any resource
1 participant