diff options
author | Ole Claussen <claussen.ole@gmail.com> | 2017-05-22 17:02:13 +0200 |
---|---|---|
committer | Ole Claussen <claussen.ole@gmail.com> | 2017-05-29 10:51:32 +0200 |
commit | bcf5474410be6198bd0bf04d1ea7a636962194e2 (patch) | |
tree | fdcf8aec7b293d754bf040ad602165bcd2c6eb75 /lib/chef/cookbook/gem_installer.rb | |
parent | 922c9f931396d16da6984bd31f767ade6495355e (diff) | |
download | chef-bcf5474410be6198bd0bf04d1ea7a636962194e2.tar.gz |
Fail loudly when the gem installer finds conflicting gem requirements
Signed-off-by: Ole Claussen <claussen.ole@gmail.com>
Diffstat (limited to 'lib/chef/cookbook/gem_installer.rb')
-rw-r--r-- | lib/chef/cookbook/gem_installer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/cookbook/gem_installer.rb b/lib/chef/cookbook/gem_installer.rb index 71e513a86b..914d6e78cd 100644 --- a/lib/chef/cookbook/gem_installer.rb +++ b/lib/chef/cookbook/gem_installer.rb @@ -43,7 +43,7 @@ class Chef if cookbook_gems[args.first].last.is_a?(Hash) args << {} unless args.last.is_a?(Hash) args.last.merge!(cookbook_gems[args.first].pop) do |key, v1, v2| - Chef::Log.warn "Conflicting requirements for gem '#{args.first}', will use #{key.inspect} => #{v2.inspect}" if v1 != v2 + raise Chef::Exceptions::GemRequirementConflict.new(args.first, key, v1, v2) if v1 != v2 v2 end end |