diff options
author | John Keiser <john@johnkeiser.com> | 2016-01-22 14:20:38 -0800 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2016-01-22 14:20:38 -0800 |
commit | 9b33d77a80db0143db21d132bad0e220c47786b5 (patch) | |
tree | db40eae28b1f1d3895607417a80ef5f83b152e99 /lib | |
parent | 1cb9cc67b71d21d1207602d1ec50ad2d68486171 (diff) | |
download | chef-9b33d77a80db0143db21d132bad0e220c47786b5.tar.gz |
Fix #4334: don't warn about ambiguous property usage
unless using properties on the resource
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/property.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/property.rb b/lib/chef/property.rb index 8ff4ecc7fc..8b5c6560a9 100644 --- a/lib/chef/property.rb +++ b/lib/chef/property.rb @@ -320,7 +320,8 @@ class Chef resource.resource_initializing && resource.respond_to?(:enclosing_provider) && resource.enclosing_provider && - resource.enclosing_provider.respond_to?(name) + resource.enclosing_provider.new_resource && + resource.enclosing_provider.new_resource.respond_to?(name) Chef::Log.warn("#{Chef::Log.caller_location}: property #{name} is declared in both #{resource} and #{resource.enclosing_provider}. Use new_resource.#{name} instead. At #{Chef::Log.caller_location}") end |