From fd21a19f360aa8368305228610d556e55f4a482b Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Tue, 21 Apr 2026 01:23:46 +0100 Subject: fix(etc-drift): tolerate no-match grep and whitespace-separated MODIFIED - grep exits 1 when pattern has no matches; under pipefail that killed the recipe. Wrap both pipelines in `{ ...; } || true`. - pacman -Qii can separate MODIFIED from the path with spaces or a tab depending on formatting; use \s+ instead of \t. --- justfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'justfile') diff --git a/justfile b/justfile index f73d4e5..f253f6e 100644 --- a/justfile +++ b/justfile @@ -210,13 +210,13 @@ etc-drift: echo "=== /etc drift ===" echo "--- modified package configs ---" - pacman -Qii 2>/dev/null | grep -oP 'MODIFIED\t\K/\S+' | sort -u \ + { pacman -Qii 2>/dev/null | grep -oP 'MODIFIED\s+\K/\S+' || true; } | sort -u \ | while IFS= read -r p; do keep "$p" && echo " modified: $p"; done echo "--- user-created (no owning package) ---" - find /etc -xdev -type f -print0 2>/dev/null \ + { find /etc -xdev -type f -print0 2>/dev/null \ | xargs -0 pacman -Qo 2>&1 >/dev/null \ - | sed -n 's/^error: No package owns //p' | sort -u \ + | sed -n 's/^error: No package owns //p' || true; } | sort -u \ | while IFS= read -r p; do keep "$p" && echo " unowned: $p"; done -- cgit v1.2.3-70-g09d2