Skip to content

Commit

Permalink
Merge pull request #535 from martinpfeifer/package_provider_fact
Browse files Browse the repository at this point in the history
prevent deprecation warning about the allow_virtual parameter
  • Loading branch information
DavidS committed Oct 13, 2015
2 parents e1a9bf5 + d73fd3c commit 4e62223
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/facter/package_provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

Facter.add(:package_provider) do
setcode do
Puppet::Type.type(:package).newpackage(:name => 'dummy')[:provider].to_s
if Gem::Version.new(Facter.value(:puppetversion)) >= Gem::Version.new('3.6')
Puppet::Type.type(:package).newpackage(:name => 'dummy', :allow_virtual => 'true')[:provider].to_s
else
Puppet::Type.type(:package).newpackage(:name => 'dummy')[:provider].to_s
end
end
end

0 comments on commit 4e62223

Please sign in to comment.