diff options
author | Tim Smith <tsmith@chef.io> | 2018-03-16 17:21:28 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-03-16 17:21:28 -0700 |
commit | 9f3354f9fa70f400222448f30adaae03a4cb9baa (patch) | |
tree | 8649c37c5517e5487fb5524180f39c4767adeff3 /lib/chef/resource/mdadm.rb | |
parent | 4c59225b2974e8ead22aa064e6577a741578143c (diff) | |
download | chef-9f3354f9fa70f400222448f30adaae03a4cb9baa.tar.gz |
Lazy eval empty Hash/Array resource properties.
Lamont pointed out that without a lazy eval we're freezing these and then if we try to append them later chef fails.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource/mdadm.rb')
-rw-r--r-- | lib/chef/resource/mdadm.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource/mdadm.rb b/lib/chef/resource/mdadm.rb index c8752ba038..3b54a53e98 100644 --- a/lib/chef/resource/mdadm.rb +++ b/lib/chef/resource/mdadm.rb @@ -33,7 +33,7 @@ class Chef allowed_actions :create, :assemble, :stop property :chunk, Integer, default: 16 - property :devices, Array, default: [] + property :devices, Array, default: lazy { [] } property :exists, [ TrueClass, FalseClass ], default: false property :level, Integer, default: 1 property :metadata, String, default: "0.90" |