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

Do not reset bundler environment if unneeded #372

Merged
merged 2 commits into from
Jun 16, 2021

Conversation

jonabc
Copy link
Contributor

@jonabc jonabc commented Jun 16, 2021

This should fix an edge case I saw in a project that uses a custom bundler and ruby build, where licensed was installed in a Gemfile and run with bundle exec licensed .... In the target scenario, the bundler reset calls in with_local_configuration were causing the environment to no longer represent the bundle exec environment, and platform-specific dependencies weren't being found.

with_local_configuration is meant to support running licensed as a standalone tool outside of bundle exec where a bundler environment has already been loaded and ENV["BUNDLE_GEMFILE"] should already be set to the expected gemfile path. The change checks whether the ENV var matches the expected local gemfile path, in which case the assumption is that the correct bundler environment is already loaded and the tool shouldn't reset anything.

@jonabc jonabc merged commit a99de6a into master Jun 16, 2021
@jonabc jonabc deleted the no-bundler-reset-if-not-needed branch June 16, 2021 16:53
jonabc added a commit that referenced this pull request Jun 16, 2021
## 3.1.0

2021-06-16

### Added

- Licensed supports Swift/Swift package manager as a dependency source (:tada: @mattt #363)'

### Changed

- The `source_path` configuration property accepts arrays of inclusion and exclusion glob patterns (#368)
- The Nuget source now uses configured fallback folders to find dependencies that are not in found in the project folder (#366)
- The Nuget source supports a configurable property for the path from the project source path to the project's `obj` folder (#365)

### Fixed
- The Go source's checks for local packages will correctly find paths in case-insensitive file systems (#370)
- The Bundler source will no longer unnecessarily reset the local Bundler environment configuration (#372)
@jonabc jonabc mentioned this pull request Jun 16, 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.

1 participant