summaryrefslogtreecommitdiff
path: root/lib/chef/recipe.rb
diff options
context:
space:
mode:
authorAdam Jacob <adam@hjksolutions.com>2008-09-08 17:42:48 -0700
committerAdam Jacob <adam@hjksolutions.com>2008-09-08 17:42:48 -0700
commit7688807e7b9e690e19e48547064b696ee35dde77 (patch)
treeeaa385b4e899148deacaf5457e7399037122788e /lib/chef/recipe.rb
parentf0177df9fdb9f5098ff850c626e86d69ead412ff (diff)
downloadchef-7688807e7b9e690e19e48547064b696ee35dde77.tar.gz
Refactoring to support a base package class, that package providers can inherit from
Diffstat (limited to 'lib/chef/recipe.rb')
-rw-r--r--lib/chef/recipe.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/recipe.rb b/lib/chef/recipe.rb
index f8344c545f..d6b9afc474 100644
--- a/lib/chef/recipe.rb
+++ b/lib/chef/recipe.rb
@@ -106,7 +106,7 @@ class Chef
resource.cookbook_name = @cookbook_name
resource.recipe_name = @recipe_name
resource.params = @params
- resource.instance_eval(&block)
+ resource.instance_eval(&block) if block
rescue Exception => e
if e.kind_of?(NameError) && e.to_s =~ /Chef::Resource/
raise NameError, "Cannot find #{rname} for #{method_name}\nOriginal: #{e.to_s}"