From 864b0d050aef05b40761a5a5b1e9d1d755697958 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 14 Aug 2026 00:15:07 -0700 Subject: [PATCH] Recognize colored package conflict errors --- bin/omarchy-update-system-pkgs-when-conflicted | 2 +- test/shell.d/update-package-conflict-test.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/omarchy-update-system-pkgs-when-conflicted b/bin/omarchy-update-system-pkgs-when-conflicted index ab2ec43c..58a3a0c0 100755 --- a/bin/omarchy-update-system-pkgs-when-conflicted +++ b/bin/omarchy-update-system-pkgs-when-conflicted @@ -66,7 +66,7 @@ trap 'exit 1' INT TERM # decision -- an upstream split retires one, but so does a package the user # picked on purpose -- so put the question to whoever started the update rather # than guess at it. Pacman printed what conflicts just above. -if grep -q '^error: unresolvable package conflicts detected$' "$errors"; then +if grep -q 'unresolvable package conflicts detected' "$errors"; then # -y promised not to ask anything, and without a terminal there is nowhere to # ask; either way pacman would sit on a prompt nobody answers. An upgrade that # isn't running --noconfirm puts its questions on stderr and reads the answers diff --git a/test/shell.d/update-package-conflict-test.sh b/test/shell.d/update-package-conflict-test.sh index ee5ad159..cbe6286f 100755 --- a/test/shell.d/update-package-conflict-test.sh +++ b/test/shell.d/update-package-conflict-test.sh @@ -49,8 +49,8 @@ write_conflict_report() { echo 0 >"$test_tmp/attempts" : >"$test_tmp/calls" { - echo "error: unresolvable package conflicts detected" - echo "error: failed to prepare transaction (conflicting dependencies)" + printf '\e[1;31merror: \e[0munresolvable package conflicts detected\n' + printf '\e[1;31merror: \e[0mfailed to prepare transaction (conflicting dependencies)\n' } >"$test_tmp/report" }