summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-07-22 09:55:26 -0600
committerJohn Keiser <john@johnkeiser.com>2015-07-27 09:38:25 -0600
commitb2eb45c854f41dc9369968b56f94eae37ed9c30c (patch)
tree79af63555e7d6ef00ca6ee73f235e3cb6ddfe8c5
parent9b957381e30423c32a52e3b9bb6ba2a6b0a09b64 (diff)
downloadchef-b2eb45c854f41dc9369968b56f94eae37ed9c30c.tar.gz
Don't set keys unless you must (for easier debugging)
-rw-r--r--lib/chef/property.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/property.rb b/lib/chef/property.rb
index 408090d37b..6579eb06a8 100644
--- a/lib/chef/property.rb
+++ b/lib/chef/property.rb
@@ -86,7 +86,7 @@ class Chef
#
def initialize(**options)
options.each { |k,v| options[k.to_sym] = v if k.is_a?(String) }
- options[:name_property] = options.delete(:name_attribute) unless options.has_key?(:name_property)
+ options[:name_property] = options.delete(:name_attribute) if options.has_key?(:name_attribute) && !options.has_key?(:name_property)
@options = options
if options.has_key?(:default)