mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Make sure individual hooks can't halt the process
This commit is contained in:
+2
-2
@@ -16,13 +16,13 @@ HOOK_DIR="$HOOK_PATH.d"
|
|||||||
shift
|
shift
|
||||||
|
|
||||||
if [[ -f $HOOK_PATH ]]; then
|
if [[ -f $HOOK_PATH ]]; then
|
||||||
bash "$HOOK_PATH" "$@"
|
bash "$HOOK_PATH" "$@" || echo "Hook failed: $HOOK_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -d $HOOK_DIR ]]; then
|
if [[ -d $HOOK_DIR ]]; then
|
||||||
for hook in "$HOOK_DIR"/*; do
|
for hook in "$HOOK_DIR"/*; do
|
||||||
[[ -f $hook ]] || continue
|
[[ -f $hook ]] || continue
|
||||||
[[ $hook == *.sample ]] && continue
|
[[ $hook == *.sample ]] && continue
|
||||||
bash "$hook" "$@"
|
bash "$hook" "$@" || echo "Hook failed: $hook"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user