From 44454db4f0199b8b9685a5d763dc37cbf79108e1 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Wed, 26 Nov 2025 20:43:34 +0530 Subject: [PATCH] Fix check_lists in ppa.sh --- src/scripts/tools/ppa.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/scripts/tools/ppa.sh b/src/scripts/tools/ppa.sh index 5db4d1f4..2fab7888 100644 --- a/src/scripts/tools/ppa.sh +++ b/src/scripts/tools/ppa.sh @@ -246,7 +246,11 @@ check_lists() { match_file=$(grep -Elr "$primary" "$list_dir" 2>/dev/null | head -n 1) fi if [ -z "$match_file" ] && [ -n "$secondary" ]; then - match_file=$(grep -Elr "$secondary" "$list_dir" 2>/dev/null | head -n 1) + local candidate + candidate=$(grep -Elr "$secondary" "$list_dir" 2>/dev/null | head -n 1) + if [ -n "$candidate" ] && { [ -z "$primary" ] || grep -Eq "$primary" "$candidate"; }; then + match_file="$candidate" + fi fi if [ -n "$match_file" ]; then local list_count