diff options
Diffstat (limited to 'lib/chef/provider/package/rubygems.rb')
-rw-r--r-- | lib/chef/provider/package/rubygems.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb index d152db1926..c53aa8934a 100644 --- a/lib/chef/provider/package/rubygems.rb +++ b/lib/chef/provider/package/rubygems.rb @@ -538,8 +538,9 @@ class Chef def install_via_gem_command(name, version) if @new_resource.source =~ /\.gem$/i name = @new_resource.source -# elsif source_is_remote? -# src = @new_resource.source && " --source=#{@new_resource.source}" + elsif @new_resource.clear_sources + src = ' --clear-sources' + src << (@new_resource.source && " --source=#{@new_resource.source}" || '') else src = @new_resource.source && " --source=#{@new_resource.source} --source=https://rubygems.org" end |