Skip to content

Commit

Permalink
[COOK-3275] LWRP repository.rb :add method fails to create yum repo i…
Browse files Browse the repository at this point in the history
…n some cases which causes :update to fail in Amazon rehl
  • Loading branch information
Sean OMeara committed Nov 5, 2013
1 parent 04423d6 commit 6a58239
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion providers/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def whyrun_supported?
else
Chef::Log.error "Repo /etc/yum.repos.d/#{new_resource.repo_name}.repo does not exist, you must create it first"
end
if repos[new_resource.repo_name]['enabled'].to_i != new_resource.enabled
if !repos.has_key?(new_resource.repo_name) || repos[new_resource.repo_name]['enabled'].to_i != new_resource.enabled
Chef::Log.info "Updating #{new_resource.repo_name} repository in /etc/yum.repos.d/#{new_resource.repo_name}.repo (setting enabled=#{new_resource.enabled})"
repo_config
else
Expand Down

0 comments on commit 6a58239

Please sign in to comment.