kiss-hook

directory based kiss-hook manager
git clone git://git.ckyln.com/~cem/kiss-hook
Log | Files | Refs | README | LICENSE

commit b556e0df1337b1e2cf8bc387961b10694c2ce7a5
parent afdd67b283bba63b595fe1631dc02e7abd64a4e7
Author: Cem Keylan <cem@ckyln.com>
Date:   Sat, 23 Jan 2021 14:04:21 +0300

hook-scripts: Don't disable exit on error

Diffstat:
Mcpt-hook | 8++++----
Mkiss-hook | 8++++----
2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/cpt-hook b/cpt-hook @@ -2,9 +2,6 @@ # shellcheck disable=1090 # A directory based cpt-hook manager. -# We don't want the package manager to exit because of an error here. -set +e - hook() { [ -e "${CPT_HOOK_DIR:=${CPT_HOOK%/*}}/$TYPE" ] || return 0 [ -e "$CPT_HOOK_DIR/lib" ] && . "$CPT_HOOK_DIR/lib" @@ -16,7 +13,10 @@ hook() { [ -f "$CPT_HOOK_DIR/$TYPE/$TYPE" ] && . "$CPT_HOOK_DIR/$TYPE/$TYPE" [ -f "$CPT_HOOK_DIR/$TYPE/$PKG" ] && . "$CPT_HOOK_DIR/$TYPE/$PKG" + + # We are returning with success, since the package manager already exits + # with in an error caused by the hooks. + return 0 } hook -set -e diff --git a/kiss-hook b/kiss-hook @@ -2,9 +2,6 @@ # shellcheck disable=1090 # A directory based kiss-hook manager. -# We don't want the package manager to exit because of an error here. -set +e - hook() { [ -e "${KISS_HOOK_DIR:=${KISS_HOOK%/*}}/$TYPE" ] || return 0 [ -e "$KISS_HOOK_DIR/lib" ] && . "$KISS_HOOK_DIR/lib" @@ -16,7 +13,10 @@ hook() { [ -f "$KISS_HOOK_DIR/$TYPE/$TYPE" ] && . "$KISS_HOOK_DIR/$TYPE/$TYPE" [ -f "$KISS_HOOK_DIR/$TYPE/$PKG" ] && . "$KISS_HOOK_DIR/$TYPE/$PKG" + + # We are returning with success, since the package manager already exits + # with in an error caused by the hooks. + return 0 } hook -set -e