mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-04 12:07:56 +00:00
25c3efe6fd
The two builders wrote the same run-a-command-or-stop step in opposite polarities. builddebs.pl used sh(...) == 0 or die; buildrpms.pl used sh(...) and die, and also used the == 0 or die form for its sh_retry calls, so both directions appeared in one file. The 'and die' spelling reads as though the die is what happens next rather than what happens on failure, which is a poor thing to have to re-read at every call site. Add BuildUtils::sh_or_die and convert the fourteen plain sh() call sites to it. The failure message now also carries the exit code, which every one of the old spellings discarded -- a build that failed said only that a command failed, not what it returned. The sh_retry sites keep their own form: retry is a different operation and sh_retry is local to buildrpms.pl. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>