summaryrefslogtreecommitdiff
path: root/lib/chef/provider/execute.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-04-13 22:21:09 -0700
committerTim Smith <tsmith84@gmail.com>2020-04-13 22:21:09 -0700
commit534ae5bbc34feed50e9319ddef94b615fe3d229c (patch)
tree492fe8334c0b374e958958c468f8860d31ae85c9 /lib/chef/provider/execute.rb
parent4bda3fd9301f00b92ea3545cfe5cb16c3e7e245b (diff)
downloadchef-534ae5bbc34feed50e9319ddef94b615fe3d229c.tar.gz
Give execute resource a proper timeout defaulttimeouts
This should just be done on the resource instead of hacking it into the provider Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/provider/execute.rb')
-rw-r--r--lib/chef/provider/execute.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/chef/provider/execute.rb b/lib/chef/provider/execute.rb
index 28769e15a6..e4fc1ee9ea 100644
--- a/lib/chef/provider/execute.rb
+++ b/lib/chef/provider/execute.rb
@@ -27,7 +27,7 @@ class Chef
provides :execute, target_mode: true
- def_delegators :new_resource, :command, :returns, :environment, :user, :domain, :password, :group, :cwd, :umask, :creates, :elevated, :default_env
+ def_delegators :new_resource, :command, :returns, :environment, :user, :domain, :password, :group, :cwd, :umask, :creates, :elevated, :default_env, :timeout
def load_current_resource
current_resource = Chef::Resource::Execute.new(new_resource.name)
@@ -41,12 +41,6 @@ class Chef
end
end
- def timeout
- # original implementation did not specify a timeout, but ShellOut
- # *always* times out. So, set a very long default timeout
- new_resource.timeout || 3600
- end
-
action :run do
if creates && sentinel_file.exist?
logger.debug("#{new_resource} sentinel file #{sentinel_file} exists - nothing to do")