diff options
author | Noah Kantrowitz <noah@coderanger.net> | 2017-06-16 16:41:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-16 16:41:22 -0700 |
commit | 0aca70f31574bcb8521de749685ab302bd30365d (patch) | |
tree | 6539b6db67fd9a9c353ddcd3c0d5af8471604e12 | |
parent | 6e0fa8d995513b4aa5835673856e98f5ea2523c4 (diff) | |
parent | 63ca03e5a824018441e0bb493557d4182640b548 (diff) | |
download | chef-0aca70f31574bcb8521de749685ab302bd30365d.tar.gz |
Merge pull request #6222 from coderanger/supports-exception
Special case for the supports pseudo-property for Chef 12.
-rw-r--r-- | lib/chef/property.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/chef/property.rb b/lib/chef/property.rb index 8fa290251a..d1be172ac2 100644 --- a/lib/chef/property.rb +++ b/lib/chef/property.rb @@ -657,6 +657,10 @@ class Chef # as needed. return if Chef::Resource.properties.keys.include?(name) + # Special case for `supports` as it was moved in Chef 13 and this is causing + # some user confusion in cookbooks that need to support both 12 and 13. + return if name.to_s == 'supports' + # Emit the deprecation. resource_name = declared_in.respond_to?(:resource_name) ? declared_in.resource_name : declared_in Chef.deprecated(:property_name_collision, "Property `#{name}` of resource `#{resource_name}` overwrites an existing method. " \ |