diff options
author | Serdar Sutay <serdar@opscode.com> | 2014-10-10 15:11:55 -0700 |
---|---|---|
committer | Serdar Sutay <serdar@opscode.com> | 2014-10-10 15:11:55 -0700 |
commit | 171c4e11000d85b6fdaeba5bfc789402e52acb39 (patch) | |
tree | a6737037f8787aacb1d14a547b37e361206df9a1 /lib/chef/dsl | |
parent | 4184ebc19a60053a59efea1db21664d1aa3bc73a (diff) | |
parent | db40a044a88264366020f69d09bc46baecb89a0d (diff) | |
download | chef-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.rb | 5 |
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 |