summaryrefslogtreecommitdiff
path: root/lib/chef/provider/package/rubygems.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-06-02 16:36:46 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2015-06-02 18:52:12 -0700
commit23e3c799803ac1800149e27271c6168539cea25e (patch)
treec6394473fc32f9b30b50a309de765940a21d2c8c /lib/chef/provider/package/rubygems.rb
parent025cabb7158fb02a89250ef91cc94ce3b3c38648 (diff)
downloadchef-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/rubygems.rb')
-rw-r--r--lib/chef/provider/package/rubygems.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb
index d120a64f0d..b5f7dbdd80 100644
--- a/lib/chef/provider/package/rubygems.rb
+++ b/lib/chef/provider/package/rubygems.rb
@@ -538,9 +538,9 @@ class Chef
src = @new_resource.source && " --source=#{@new_resource.source} --source=https://rubygems.org"
end
if !version.nil? && version.length > 0
- shell_out!("#{gem_binary_path} install #{name} -q --no-rdoc --no-ri -v \"#{version}\"#{src}#{opts}", :env=>nil)
+ shell_out_with_timeout!("#{gem_binary_path} install #{name} -q --no-rdoc --no-ri -v \"#{version}\"#{src}#{opts}", :env=>nil)
else
- shell_out!("#{gem_binary_path} install \"#{name}\" -q --no-rdoc --no-ri #{src}#{opts}", :env=>nil)
+ shell_out_with_timeout!("#{gem_binary_path} install \"#{name}\" -q --no-rdoc --no-ri #{src}#{opts}", :env=>nil)
end
end
@@ -564,9 +564,9 @@ class Chef
def uninstall_via_gem_command(name, version)
if version
- shell_out!("#{gem_binary_path} uninstall #{name} -q -x -I -v \"#{version}\"#{opts}", :env=>nil)
+ shell_out_with_timeout!("#{gem_binary_path} uninstall #{name} -q -x -I -v \"#{version}\"#{opts}", :env=>nil)
else
- shell_out!("#{gem_binary_path} uninstall #{name} -q -x -I -a#{opts}", :env=>nil)
+ shell_out_with_timeout!("#{gem_binary_path} uninstall #{name} -q -x -I -a#{opts}", :env=>nil)
end
end