diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-06-02 16:36:46 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-06-02 18:52:12 -0700 |
commit | 23e3c799803ac1800149e27271c6168539cea25e (patch) | |
tree | c6394473fc32f9b30b50a309de765940a21d2c8c /lib/chef/provider/package/macports.rb | |
parent | 025cabb7158fb02a89250ef91cc94ce3b3c38648 (diff) | |
download | chef-23e3c799803ac1800149e27271c6168539cea25e.tar.gz |
fix package timeout attribute
updates all the shell_out calls to respect the timeout which is passed
on the new_resource.
the old `Chef::Config` yum timeout values are still respected and will
override the default.
the default of 900 seconds is preserved.
Diffstat (limited to 'lib/chef/provider/package/macports.rb')
-rw-r--r-- | lib/chef/provider/package/macports.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/provider/package/macports.rb b/lib/chef/provider/package/macports.rb index 97c13fec73..e945211540 100644 --- a/lib/chef/provider/package/macports.rb +++ b/lib/chef/provider/package/macports.rb @@ -48,21 +48,21 @@ class Chef unless @current_resource.version == version command = "port#{expand_options(@new_resource.options)} install #{name}" command << " @#{version}" if version and !version.empty? - shell_out!(command) + shell_out_with_timeout!(command) end end def purge_package(name, version) command = "port#{expand_options(@new_resource.options)} uninstall #{name}" command << " @#{version}" if version and !version.empty? - shell_out!(command) + shell_out_with_timeout!(command) end def remove_package(name, version) command = "port#{expand_options(@new_resource.options)} deactivate #{name}" command << " @#{version}" if version and !version.empty? - shell_out!(command) + shell_out_with_timeout!(command) end def upgrade_package(name, version) @@ -75,14 +75,14 @@ class Chef # that hasn't been installed. install_package(name, version) elsif current_version != version - shell_out!( "port#{expand_options(@new_resource.options)} upgrade #{name} @#{version}" ) + shell_out_with_timeout!( "port#{expand_options(@new_resource.options)} upgrade #{name} @#{version}" ) end end private def get_response_from_command(command) output = nil - status = shell_out(command) + status = shell_out_with_timeout(command) begin output = status.stdout rescue Exception |