File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed
Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change 2323 printf >&2 ' %s\n' " ${_files_to_be_commited[@]} "
2424fi
2525
26- _args =(
26+ _test_args =(
2727 --test ' units'
2828 --cicd
2929)
3030
3131if [[ -x " ${__G_DIR__} /scripts/vader-run-tests.sh" ]]; then
32- _exec_path=" ${__G_DIR__} /scripts/vader-run-tests.sh"
32+ _test_exec_path=" ${__G_DIR__} /scripts/vader-run-tests.sh"
33+ _vimdoc_target=" ${__G_DIR__} "
3334elif [[ -x " ${__GG_DIR__} /scripts/vader-run-tests.sh" ]]; then
34- _exec_path=" ${__GG_DIR__} /scripts/vader-run-tests.sh"
35+ _test_exec_path=" ${__GG_DIR__} /scripts/vader-run-tests.sh"
36+ _vimdoc_target=" ${__GG_DIR__} "
3537else
3638 printf >&2 ' Cannot find executable path for -> scripts/vader-run-tests.sh\n'
3739 exit 127
3840fi
3941
42+ _vimdoc_exec_path=" $( which vimdoc) "
43+ if grep -qE -- ' \.vim\>' <<< " ${_files_to_be_commited[*]}" ; then
44+ if [[ -x " ${_vimdoc_exec_path} " ]]; then
45+ printf >&2 ' %s: Running vimdoc because you are committing:\n' " ${__NAME__} "
46+ printf >&2 ' %s\n' " ${_files_to_be_commited[@]} "
47+ " ${_vimdoc_exec_path} " " ${_vimdoc_target} "
48+ else
49+ printf >&2 ' %s: Warning no vimdoc executable found but changes detected for vim files\n' " ${__NAME__} "
50+ fi
51+ fi
52+
53+
54+
55+
4056# #
4157# Warning: doing `command 2>&1 | parser` causes spaces to be injected outside
4258# of what `parser` can capture?!
43- " ${_exec_path } " " ${_args [@]} " 2> >(
59+ " ${_test_exec_path } " " ${_test_args [@]} " 2> >(
4460 awk ' BEGIN {
4561 delete _buffered_lines;
4662 _current_vader_file = "";
You can’t perform that action at this time.
0 commit comments