summaryrefslogtreecommitdiff
path: root/lib/chef/provider
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-06-19 18:28:16 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2018-06-19 18:28:16 -0700
commitccfe07dbd812890a732432bae7c2e522b79f643d (patch)
tree15dde4c15dc65f4d2aadeb3f601704315e740f1b /lib/chef/provider
parent256e57adbda5fd53653c8c2ebba7bbd72e84a8bf (diff)
downloadchef-ccfe07dbd812890a732432bae7c2e522b79f643d.tar.gz
deprecate old shell_out APIs
note that this restores the behavior of shell_out_with_timeout() which downstream consumers may be using, and correctly treats custom resources and LWRPs the same, along with setting up removing all this backcompat weirdness in Chef-15. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider')
-rw-r--r--lib/chef/provider/package.rb23
1 files changed, 4 insertions, 19 deletions
diff --git a/lib/chef/provider/package.rb b/lib/chef/provider/package.rb
index ddd2fa5dd6..0af4f87d7f 100644
--- a/lib/chef/provider/package.rb
+++ b/lib/chef/provider/package.rb
@@ -668,27 +668,12 @@ class Chef
end
end
- def shell_out_with_timeout(*command_args) # FIXME: deprecated
- shell_out(*add_timeout_option(command_args))
+ def shell_out_with_timeout(*command_args)
+ shell_out_compact_timeout(*command_args)
end
- def shell_out_with_timeout!(*command_args) # FIXME: deprecated
- shell_out!(*add_timeout_option(command_args))
- end
-
- def add_timeout_option(command_args)
- # this is deprecated but its not quite done yet
- #Chef.deprecated(:package_misc, "shell_out_with_timeout and add_timeout_option are deprecated methods, use shell_out instead")
- args = command_args.dup
- if args.last.is_a?(Hash)
- options = args.pop.dup
- options[:timeout] = new_resource.timeout if new_resource.timeout
- options[:timeout] = 900 unless options.key?(:timeout)
- args << options
- else
- args << { timeout: new_resource.timeout ? new_resource.timeout : 900 }
- end
- args
+ def shell_out_with_timeout!(*command_args)
+ shell_out_compact_timeout!(*command_args)
end
end
end