Skip to content

Commit

Permalink
change the order of executing hooks for the same task and class
Browse files Browse the repository at this point in the history
when two hooks task.CLASS and task.CLASS.sh are available now the
order is to first execute task.CLASS.sh then task.CLASS
  • Loading branch information
Mrfai committed Aug 12, 2019
1 parent 3bfd970 commit 3c39bd3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/subroutines
Original file line number Diff line number Diff line change
Expand Up @@ -298,20 +298,20 @@ call_hook() {
echo "WARNING: The suffix .source is deprecated. Use .sh instead." >&2
# continue
fi
if [ -x $hfile ]; then
echo "Calling hook: $hook.$cl"
sendmon "HOOK $hook.$cl"
# execute the hook
$hfile $dflag "$@"
check_status $hook.$cl $?
fi
if [ -x $hfile.sh ]; then
echo "Source hook: $hook.$cl.sh"
sendmon "HOOK $hook.$cl.sh"
# source this hook
. $hfile.sh $dflag "$@"
check_status $hook.$cl.sh $?
fi
if [ -x $hfile ]; then
echo "Calling hook: $hook.$cl"
sendmon "HOOK $hook.$cl"
# execute the hook
$hfile $dflag "$@"
check_status $hook.$cl $?
fi
# deprecated
if [ -x $hfile.source ]; then
echo "Source hook: $hook.$cl.source"
Expand Down

0 comments on commit 3c39bd3

Please sign in to comment.