Recognize colored package conflict errors

This commit is contained in:
David Heinemeier Hansson
2026-08-14 00:15:07 -07:00
parent 5ca3030c5a
commit 864b0d050a
2 changed files with 3 additions and 3 deletions
@@ -66,7 +66,7 @@ trap 'exit 1' INT TERM
# decision -- an upstream split retires one, but so does a package the user # 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 # picked on purpose -- so put the question to whoever started the update rather
# than guess at it. Pacman printed what conflicts just above. # 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 # -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 # 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 # isn't running --noconfirm puts its questions on stderr and reads the answers
+2 -2
View File
@@ -49,8 +49,8 @@ write_conflict_report() {
echo 0 >"$test_tmp/attempts" echo 0 >"$test_tmp/attempts"
: >"$test_tmp/calls" : >"$test_tmp/calls"
{ {
echo "error: unresolvable package conflicts detected" printf '\e[1;31merror: \e[0munresolvable package conflicts detected\n'
echo "error: failed to prepare transaction (conflicting dependencies)" printf '\e[1;31merror: \e[0mfailed to prepare transaction (conflicting dependencies)\n'
} >"$test_tmp/report" } >"$test_tmp/report"
} }