confz

git mirror of https://ccx.te2000.cz/bzr/confz
git clone https://ccx.te2000.cz/git/confz
Log | Files | Refs

commit 05ff1e9887f4801c2be7d465d5d831a58af99926
parent 0cd7abb6faa3850a262399b61525868f80109dd5
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Thu, 19 Jun 2014 21:11:57 +0200

hide errno when fail_reason is set, clear it more often
Diffstat:
Mbin/confz | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/bin/confz b/bin/confz @@ -145,7 +145,7 @@ require() { # confz_${name}_check # set -x # fi - die "$name: check failed with error $check_ret: $fail_reason" + die "$name: check failed: ${fail_reason:-error $check_ret}" else confz_do "${do_command[@]}" "$@" @@ -159,12 +159,14 @@ require() { check_only_prev=$check_only check_only=1 confz_${name}_check "$@" || \ - die "$name: check failed with error $?: $fail_reason" + die "$name: check failed: ${fail_reason:-error $?}" confz_check_ok $name check_only=$check_only_prev fi fi + # clear fail_reason + fail_reason='' # restore $do_command do_command=( "${do_command_prev[@]}" )