Let a stepped-over step say why, and let sudo ask

soft() swallowed stderr, which hid both halves of what matters: the dnf error
explaining the failure, and the sudo password prompt on a machine that asks for
one. stdout only.
This commit is contained in:
Gabriel Brown
2026-08-22 09:38:41 -04:00
parent 669a228286
commit 78db2d5689
+5 -1
View File
@@ -33,9 +33,13 @@ packages_in() {
#
# So the ordering rule for this file: anything that can fail for a reason
# outside this repository goes below the desktop, and goes through here.
# stdout only. Swallowing stderr here would hide the one line that says WHY a
# step was stepped over -- and worse, every one of these runs under sudo, whose
# password prompt is the thing you would be hiding on a machine that asks for
# one.
soft() {
local what="$1"; shift
"$@" >/dev/null 2>&1 || { log "$what did not complete; continuing"; softly_failed+=("$what"); }
"$@" >/dev/null || { log "$what did not complete; continuing"; softly_failed+=("$what"); }
}
softly_failed=()