From 7f760f67d178c050a521b6c0ead38fa1cec0eeee Mon Sep 17 00:00:00 2001 From: Serdar Sutay Date: Mon, 8 Dec 2014 14:54:58 -0800 Subject: 28fd0c9c87c6fceb7068776a04c32cd8381fe8f6 removed the path attribute from execute resource. Even tough this attribute is not being honored by any provider, some existing cookbooks are still depending on this attribute. Restore path attribute in execute resource with a deprecation message that it will be removed in Chef 13. --- lib/chef/resource/execute.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/chef/resource/execute.rb') diff --git a/lib/chef/resource/execute.rb b/lib/chef/resource/execute.rb index dfae88b24e..6853b62887 100644 --- a/lib/chef/resource/execute.rb +++ b/lib/chef/resource/execute.rb @@ -36,6 +36,7 @@ class Chef @cwd = nil @environment = nil @group = nil + @path = nil @returns = 0 @timeout = nil @user = nil @@ -94,6 +95,16 @@ class Chef ) end + def path(arg=nil) + Chef::Log.warn "'path' attribute of 'execute' is not used by any provider in Chef 11 and Chef 12. Use 'environment' attribute to configure 'PATH'. This attribute will be removed in Chef 13." + + set_or_return( + :path, + arg, + :kind_of => [ Array ] + ) + end + def returns(arg=nil) set_or_return( :returns, -- cgit v1.2.1