diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-05-11 11:00:03 -0500 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-05-11 11:00:03 -0500 |
commit | 7c4fff28830fb63a3aa88fcdfb968af18c0cb6fd (patch) | |
tree | 1da52a6a2e5d91218d6bb8a60f27c5133549846f /lib/chef/provider/package.rb | |
parent | 702b638e2410ba3a473db602d0a5912355bdd76a (diff) | |
download | chef-7c4fff28830fb63a3aa88fcdfb968af18c0cb6fd.tar.gz |
Fail if both source and multipackage are provided for package
See issue #3075
Diffstat (limited to 'lib/chef/provider/package.rb')
-rw-r--r-- | lib/chef/provider/package.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/provider/package.rb b/lib/chef/provider/package.rb index 6b429a400d..bdc96cd070 100644 --- a/lib/chef/provider/package.rb +++ b/lib/chef/provider/package.rb @@ -43,6 +43,12 @@ class Chef true end + def check_resource_semantics! + if new_resource.package_name.is_a?(Array) && new_resource.source != nil + raise Chef::Exceptions::InvalidResourceSpecification, "You may not specify both multipackage and source" + end + end + def load_current_resource end |