Skip to content

Commit 9f03798

Browse files
committed
Problem: pgpm search lists all packages
Solution: ensure we actually filter non-matching packages out :facepalm
1 parent f2289c4 commit 9f03798

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

exe/pgpm

+2-1
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,10 @@ module Pgpm
137137
Parallel.filter_map(Pgpm::Package, in_threads: Etc.nprocessors) do |p|
138138
next if p.contrib?
139139

140-
p.all_searchable_texts.any? do |t|
140+
found = p.all_searchable_texts.any? do |t|
141141
t =~ query_regexp
142142
end
143+
next unless found
143144
output = case format
144145
when "json" then Oj.dump({
145146
name: p.package_name,

0 commit comments

Comments
 (0)