mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
* 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:
parent
74f82ed477
commit
933387e739
1 changed files with 1 additions and 1 deletions
|
@ -258,7 +258,7 @@ module Inspec::Resources
|
||||||
cmd = inspec.command("apk info -vv --no-network | grep #{package_name}")
|
cmd = inspec.command("apk info -vv --no-network | grep #{package_name}")
|
||||||
return {} if cmd.exit_status.to_i != 0
|
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]
|
pkg = pkg_info[0].split(' - ')[0]
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue