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:
@@ -33,9 +33,13 @@ packages_in() {
|
|||||||
#
|
#
|
||||||
# So the ordering rule for this file: anything that can fail for a reason
|
# 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.
|
# 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() {
|
soft() {
|
||||||
local what="$1"; shift
|
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=()
|
softly_failed=()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user