diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-10-26 17:42:58 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-10-26 17:42:58 -0700 |
commit | dca903c1e9a13cc87f400b804412c80da6312f55 (patch) | |
tree | ea2619a96b5ba97b45a1cdfe815a4b7aa48d0576 /lib/chef/mixin/shell_out.rb | |
parent | e695014e818d8ef9bbfbd3157f9973c412580431 (diff) | |
download | chef-dca903c1e9a13cc87f400b804412c80da6312f55.tar.gz |
this still needs to be restricted to only providers
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/mixin/shell_out.rb')
-rw-r--r-- | lib/chef/mixin/shell_out.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/mixin/shell_out.rb b/lib/chef/mixin/shell_out.rb index 1ca272b805..a96bd1527f 100644 --- a/lib/chef/mixin/shell_out.rb +++ b/lib/chef/mixin/shell_out.rb @@ -75,7 +75,9 @@ class Chef # historically resources have not properly declared defaults on their timeouts, so a default default of 900s was enforced here default_val = 900 return options if options.key?(:timeout) - if obj.respond_to?(:new_resource) && obj.new_resource.respond_to?(:timeout) && !options.key?(:timeout) + # FIXME: need to nuke descendents tracker out of Chef::Provider so we can just define that class here without requiring the + # world, and then just use symbol lookup + if obj.class.ancestors.map(&:name).include?("Chef::Provider") && obj.respond_to?(:new_resource) && obj.new_resource.respond_to?(:timeout) && !options.key?(:timeout) options[:timeout] = obj.new_resource.timeout ? obj.new_resource.timeout.to_f : default_val end options |