Skip to content

Commit

Permalink
Don't add -1 to nil
Browse files Browse the repository at this point in the history
Helps with #679 so we can omit versions still, when needed.
  • Loading branch information
martinb3 committed Sep 17, 2018
1 parent 694b2a9 commit eca59b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/provider_install.rb
Expand Up @@ -53,7 +53,7 @@ def install_repo_wrapper_action
end
end

if %w[rhel amazon].include?(node['platform_family']) && !new_resource.version.include?('-')
if !new_resource.version.nil? && %w[rhel amazon].include?(node['platform_family']) && !new_resource.version.include?('-')
# NB: yum repo packages are broken in Chef if you don't specify a release
# https://github.com/chef/chef/issues/4103
new_resource.version = "#{new_resource.version}-1"
Expand Down

0 comments on commit eca59b7

Please sign in to comment.