* updates the AlpinePkg class `info` method to use the `delete_if` method as the `reject!` method was returning nil.

Signed-off-by: Aaron Lippold <lippold@gmail.com>
This commit is contained in:
Aaron Lippold 2018-10-10 09:20:33 -04:00 committed by Jared Quick
parent 74f82ed477
commit 933387e739

View file

@ -258,7 +258,7 @@ module Inspec::Resources
cmd = inspec.command("apk info -vv --no-network | grep #{package_name}")
return {} if cmd.exit_status.to_i != 0
pkg_info = cmd.stdout.split("\n").reject! { |e| e =~ /^WARNING/i }
pkg_info = cmd.stdout.split("\n").delete_if { |e| e =~ /^WARNING/i }
pkg = pkg_info[0].split(' - ')[0]
{