From cec349aa07adc2abd8275bd6db237a744755e1f7 Mon Sep 17 00:00:00 2001 From: Jim Radford Date: Wed, 12 Nov 2014 15:04:24 -0800 Subject: [PATCH] apt-check (oddly) outputs its result to stderr --- lib/facter/apt_updates.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/facter/apt_updates.rb b/lib/facter/apt_updates.rb index 77e667e6d7..75670bc397 100644 --- a/lib/facter/apt_updates.rb +++ b/lib/facter/apt_updates.rb @@ -2,7 +2,7 @@ Facter.add("apt_has_updates") do confine :osfamily => 'Debian' if File.executable?("/usr/lib/update-notifier/apt-check") - apt_package_updates = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check 2>/dev/null').split(';') + apt_package_updates = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check 2>&1').split(';') end setcode do @@ -13,7 +13,7 @@ Facter.add("apt_package_updates") do confine :apt_has_updates => true setcode do - packages = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check -p 2>/dev/null').split("\n") + packages = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check -p 2>&1').split("\n") if Facter.version < '2.0.0' packages.join(',') else