]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commit
(GH-139) Throw away STDERR from dpkg-query in Fact
authorDan Carley <dan.carley@gmail.com>
Mon, 4 Mar 2013 08:08:51 +0000 (08:08 +0000)
committerDan Carley <dan.carley@gmail.com>
Mon, 4 Mar 2013 08:08:51 +0000 (08:08 +0000)
commit7c1ebd1d339ac73fb3b4f7c74b8fb9587d4244c7
treee5e4f210c26ec01857230825e11cdecc790891f6
parent841be5835a072a1463621d6385a866dfb52bedd0
(GH-139) Throw away STDERR from dpkg-query in Fact

Newer versions of dpkg-query, as of Ubuntu 12.10, will make noise on STDERR
if the queried package isn't currently installed. Facter's `exec()` outputs
this without giving us a chance to catch it.

Pipe STDERR to `/dev/null` so that it's not seen by the end-user. STDOUT
will still be `nil` if the package isn't installed. It doesn't seem
reasonable to spec test for this without reaching deep into Facter, so I'm
not going to.
lib/facter/iptables_persistent_version.rb