diff options
Diffstat (limited to 'lib')
| -rwxr-xr-x | lib/puppet/type/package/ports.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/type/package/ports.rb b/lib/puppet/type/package/ports.rb index b748ffb3e..972aa90be 100755 --- a/lib/puppet/type/package/ports.rb +++ b/lib/puppet/type/package/ports.rb @@ -13,7 +13,12 @@ module Puppet cmd = "/usr/local/sbin/portupgrade -p -N -P #{self[:name]}" self.debug "Executing %s" % cmd.inspect - output = %x{#{cmd} 2>&1} + output = %x{#{cmd} 2>&1 1>/dev/null} + + if output =~ /\*\* No such / + raise Puppet::PackageError, "Could not find package %s" % self[:name] + end + #output = %x{#{cmd} 2>&1} unless $? == 0 raise Puppet::PackageError.new(output) |
