diff options
author | John Keiser <john@johnkeiser.com> | 2015-07-30 19:49:42 -0600 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2015-07-31 12:42:29 -0600 |
commit | 2a600705e6f7740fca4212b2f7e34508d44babad (patch) | |
tree | 46fbc04b7e9aeb445848843ca1b8f04ba10d3465 /lib/chef/provider.rb | |
parent | 5d7a7fd7bc2af573854a7c3811c9e891c4b3e38c (diff) | |
download | chef-2a600705e6f7740fca4212b2f7e34508d44babad.tar.gz |
Move current_value_does_not_exist! directly on Resource
Diffstat (limited to 'lib/chef/provider.rb')
-rw-r--r-- | lib/chef/provider.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/chef/provider.rb b/lib/chef/provider.rb index b9b9ac8126..f2a493c3e6 100644 --- a/lib/chef/provider.rb +++ b/lib/chef/provider.rb @@ -193,6 +193,10 @@ class Chef # @return [Boolean] whether the block was executed. # def converge_if_changed(*properties, &converge_block) + if !converge_block + raise ArgumentError, "converge_if_changed must be passed a block!" + end + properties = new_resource.class.state_properties.map { |p| p.name } if properties.empty? properties = properties.map { |p| p.to_sym } if current_resource |