confz

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

commit 44c5e7043005fdd16eafba18246d60bb5367e6a7
parent 72ecaf609f7795dc11c271f4add677cefad91730
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Tue, 24 Jun 2014 16:30:42 +0200

print failure reason on first failure in verbose mode
Diffstat:
Mbin/confz | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/bin/confz b/bin/confz @@ -95,14 +95,14 @@ require() { # %foo=bar -- passes ${vars[foo]} from callee # to variable ${vars[bar]} of caller # <arguments> are arguments passed to the dependency function - + local name outer inner indent_prev check_only_prev check_ret local -a do_command_prev local -A vars_local lift name=$1 shift - + # store and clear $vars vars_prev=( "${(@kv)vars}" ) vars_local=( "${(@kv)vars}" ) @@ -147,10 +147,13 @@ require() { # fi die "$name: check failed: ${fail_reason:-error $check_ret}" else + if (($verbose)); then + print -r - "$confz_indent$fg[cyan]*$fg[default] reason: ${fail_reason:-error $check_ret}" + fi confz_do "${do_command[@]}" "$@" - + # print check start - confz_check_start $name "$@" ...again + confz_check_start $name "$@" again... # clear fail_reason fail_reason=''