Remove stderr from stdout
confine :osfamily => 'Debian'
setcode do
if File.executable?("/usr/lib/update-notifier/apt-check")
- packages = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check -p 2>&1')
+ packages = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check -p 2>/dev/null')
packages = packages.split("\n")
if Facter.version < '2.0.0'
packages = packages.join(',')
confine :osfamily => 'Debian'
setcode do
if File.executable?("/usr/lib/update-notifier/apt-check")
- updates = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check 2>&1')
+ updates = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check 2>/dev/null')
Integer(updates.strip.split(';')[1])
end
end
confine :osfamily => 'Debian'
setcode do
if File.executable?("/usr/lib/update-notifier/apt-check")
- updates = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check 2>&1')
+ updates = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check 2>/dev/null')
Integer(updates.strip.split(';')[0])
end
end