Revision c253e352
Added by Renato Botelho over 7 years ago
src/etc/inc/pkg-utils.inc | ||
---|---|---|
390 | 390 |
"search {$extra_param}-R --raw-format json-compact " . |
391 | 391 |
$pkgs, $search_out, $search_err); |
392 | 392 |
if ($search_rc == 0) { |
393 |
$search_items = explode("\n", $search_out);
|
|
393 |
$search_items = explode("\n", chop($search_out));
|
|
394 | 394 |
array_walk($search_items, function(&$v, &$k) { |
395 | 395 |
$v = json_decode($v, true); |
396 | 396 |
}); |
... | ... | |
408 | 408 |
$info_rc = pkg_exec("info -R --raw-format json-compact " . |
409 | 409 |
$pkgs, $info_out, $info_err); |
410 | 410 |
if ($info_rc == 0) { |
411 |
$info_items = explode("\n", $info_out);
|
|
411 |
$info_items = explode("\n", chop($info_out));
|
|
412 | 412 |
array_walk($info_items, function(&$v, &$k) { |
413 | 413 |
$v = json_decode($v, true); |
414 | 414 |
}); |
Also available in: Unified diff
Remove empty items from output