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/exceptions.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/exceptions.rb')
-rw-r--r-- | lib/chef/exceptions.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb index a09a3a062c..1f4f5c595b 100644 --- a/lib/chef/exceptions.rb +++ b/lib/chef/exceptions.rb @@ -521,5 +521,11 @@ This error is most often caused by network issues (proxies, etc) outside of chef # exception specific to invalid usage of 'dsc_resource' resource class DSCModuleNameMissing < ArgumentError; end + + class GemRequirementConflict < RuntimeError + def initialize(gem_name, option, value1, value2) + super "Conflicting requirements for gem '#{gem_name}': Both #{value1.inspect} and #{value2.inspect} given for option #{option.inspect}" + end + end end end |