Skip to content

Commit

Permalink
Include $file in hooks failure message
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrisbin committed Dec 29, 2022
1 parent a73c57f commit 88f6fc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion share/rcm.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ run_hooks() {
hook_ret=$?

if [ "$hook_ret" -ne 0 ]; then
echo "$when-$direction hook exited non-zero ($hook_ret)" >&2
echo "$when-$direction hook $file exited non-zero ($hook_ret)" >&2
exit $hook_ret # NB. this only exits the while-read; caller must still check and exit
fi
done
Expand Down
2 changes: 1 addition & 1 deletion test/rcup-hooks-failure.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ Pre-up hooks failing should prevent rcup continuing

$ rcup
1
pre-up hook exited non-zero (7)
pre-up hook */.dotfiles/hooks/pre-up/00-test.sh exited non-zero (7) (glob)
[7]

0 comments on commit 88f6fc7

Please sign in to comment.