summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-05-11 11:00:03 -0500
committerJay Mundrawala <jdmundrawala@gmail.com>2015-05-11 11:00:03 -0500
commit7c4fff28830fb63a3aa88fcdfb968af18c0cb6fd (patch)
tree1da52a6a2e5d91218d6bb8a60f27c5133549846f
parent702b638e2410ba3a473db602d0a5912355bdd76a (diff)
downloadchef-7c4fff28830fb63a3aa88fcdfb968af18c0cb6fd.tar.gz
Fail if both source and multipackage are provided for package
See issue #3075
-rw-r--r--lib/chef/provider/package.rb6
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