diff options
| author | 2026-04-21 01:23:46 +0100 | |
|---|---|---|
| committer | 2026-04-21 01:23:46 +0100 | |
| commit | fd21a19f360aa8368305228610d556e55f4a482b (patch) | |
| tree | 784f63a35aa5533473a093adcfcbe5ab08a72793 /justfile | |
| parent | 372b8b27a64179602a8c81fe9d12931ebb5b8cef (diff) | |
| download | dotfiles-fd21a19f360aa8368305228610d556e55f4a482b.tar.gz dotfiles-fd21a19f360aa8368305228610d556e55f4a482b.tar.bz2 dotfiles-fd21a19f360aa8368305228610d556e55f4a482b.zip | |
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.
Diffstat (limited to 'justfile')
| -rw-r--r-- | justfile | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |
