summaryrefslogtreecommitdiff
path: root/lib/chef/dsl
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-10-10 15:11:55 -0700
committerSerdar Sutay <serdar@opscode.com>2014-10-10 15:11:55 -0700
commit171c4e11000d85b6fdaeba5bfc789402e52acb39 (patch)
treea6737037f8787aacb1d14a547b37e361206df9a1 /lib/chef/dsl
parent4184ebc19a60053a59efea1db21664d1aa3bc73a (diff)
parentdb40a044a88264366020f69d09bc46baecb89a0d (diff)
downloadchef-171c4e11000d85b6fdaeba5bfc789402e52acb39.tar.gz
Merge pull request #2041 from nsdavidson/Issues-1689
Added exec method to Recipe, addressing Issue 1689
Diffstat (limited to 'lib/chef/dsl')
-rw-r--r--lib/chef/dsl/recipe.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/chef/dsl/recipe.rb b/lib/chef/dsl/recipe.rb
index 3282320b8c..476d9db666 100644
--- a/lib/chef/dsl/recipe.rb
+++ b/lib/chef/dsl/recipe.rb
@@ -19,6 +19,7 @@
require 'chef/resource_platform_map'
require 'chef/mixin/convert_to_class_name'
+require 'chef/exceptions'
class Chef
module DSL
@@ -162,6 +163,10 @@ class Chef
end
end
+ def exec(args)
+ raise Chef::Exceptions::ResourceNotFound, "exec was called, but you probably meant to use an execute resource. If not, please call Kernel#exec explicitly. The exec block called was \"#{args}\""
+ end
+
end
end
end