Revision 5535d91d
Added by Renato Botelho over 7 years ago
src/etc/inc/pkg-utils.inc | ||
---|---|---|
426 | 426 |
"search {$extra_param}-R --raw-format json-compact " . |
427 | 427 |
$pkgs, $search_out, $search_err); |
428 | 428 |
if ($search_rc == 0) { |
429 |
$search_items = explode("\n", $search_out);
|
|
429 |
$search_items = explode("\n", chop($search_out));
|
|
430 | 430 |
array_walk($search_items, function(&$v, &$k) { |
431 | 431 |
$v = json_decode($v, true); |
432 | 432 |
}); |
... | ... | |
444 | 444 |
$info_rc = pkg_exec("info -R --raw-format json-compact " . |
445 | 445 |
$pkgs, $info_out, $info_err); |
446 | 446 |
if ($info_rc == 0) { |
447 |
$info_items = explode("\n", $info_out);
|
|
447 |
$info_items = explode("\n", chop($info_out));
|
|
448 | 448 |
array_walk($info_items, function(&$v, &$k) { |
449 | 449 |
$v = json_decode($v, true); |
450 | 450 |
}); |
Also available in: Unified diff
Remove empty items from output