Skip to content

Commit 44454db

Browse files
committed
Fix check_lists in ppa.sh
1 parent 9d7558f commit 44454db

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/scripts/tools/ppa.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,11 @@ check_lists() {
246246
match_file=$(grep -Elr "$primary" "$list_dir" 2>/dev/null | head -n 1)
247247
fi
248248
if [ -z "$match_file" ] && [ -n "$secondary" ]; then
249-
match_file=$(grep -Elr "$secondary" "$list_dir" 2>/dev/null | head -n 1)
249+
local candidate
250+
candidate=$(grep -Elr "$secondary" "$list_dir" 2>/dev/null | head -n 1)
251+
if [ -n "$candidate" ] && { [ -z "$primary" ] || grep -Eq "$primary" "$candidate"; }; then
252+
match_file="$candidate"
253+
fi
250254
fi
251255
if [ -n "$match_file" ]; then
252256
local list_count

0 commit comments

Comments
 (0)