=== modified file 'bin/confz' --- bin/confz 2014-06-19 18:33:35 +0000 +++ bin/confz 2014-06-19 18:17:59 +0000 @@ -128,35 +128,32 @@ do_command_prev=( "${do_command[@]}" ) do_command=( confz_${name}_do ) - # perform check - run - check - if confz_${name}_check "$@"; then - confz_check_ok $name - else - if (($check_only)); then - die "$name: check failed with error $?" + # perform check & run + if ! (($check_only)); then + if confz_${name}_check "$@"; then + confz_check_ok $name else confz_check_fail $name confz_do "${do_command[@]}" "$@" - - # print check start - confz_check_start $name "$@" "(again)" - - # perform check once again - check_only_prev=$check_only - check_only=1 - confz_${name}_check "$@" || die "$name: check failed with error $?" - confz_check_ok $name - check_only=$check_only_prev fi + + # print check start + confz_check_start $name "$@" fi + # perform check once again + check_only_prev=$check_only + check_only=1 + confz_${name}_check "$@" || die "$name: check failed with error $?" + confz_check_ok $name + check_only=$check_only_prev # restore $do_command do_command=( "${do_command_prev[@]}" ) # restore old $vars and put calee's $vars into $vars_prev vars_prev=( "${(@kv)vars}" ) - vars=( "${(@kv)vars_local}" ) + vars=( "${(kv)vars_local[@]}" ) # lift %variables from calee to caller for outer inner in ${(kv)lift}; do