diff options
author | Brian Hawley <bhawley@verticalresponse.com> | 2016-05-24 19:20:48 -0700 |
---|---|---|
committer | Brian Hawley <bhawley@verticalresponse.com> | 2016-05-24 19:20:48 -0700 |
commit | 1dc9911e5fb999b60ea15f515b9b8001ac005f4f (patch) | |
tree | c7521d0a964ea3c9fb6ca40abe4591e03f257ab8 /lib/bundler/runtime.rb | |
parent | dbad52b5b477936b25c2c5605247a9e70a0796cb (diff) | |
download | bundler-1dc9911e5fb999b60ea15f515b9b8001ac005f4f.tar.gz |
Fix the combination of gem :require and env or install_if
If you guard the installation of a gem with env or install_if, and that
gem declaration has a :require option specified, it tried to require
the gem even though it hadn't been installed. It looks like a spot was
missed when the env command was added in the first place.
Diffstat (limited to 'lib/bundler/runtime.rb')
-rw-r--r-- | lib/bundler/runtime.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb index 6f02ad85..b0ff6f5a 100644 --- a/lib/bundler/runtime.rb +++ b/lib/bundler/runtime.rb @@ -68,9 +68,9 @@ module Bundler groups = [:default] if groups.empty? @definition.dependencies.each do |dep| - # Skip the dependency if it is not in any of the requested - # groups - next unless (dep.groups & groups).any? && dep.current_platform? + # Skip the dependency if it is not in any of the requested groups, or + # not for the current platform, or doesn't match the gem constraints. + next unless (dep.groups & groups).any? && dep.should_include? required_file = nil |