From f89c73694e5c5a057f06460410d278f3727e5225 Mon Sep 17 00:00:00 2001 From: Victor Lowther Date: Sun, 8 Jun 2008 19:17:36 -0500 Subject: Simplify hook exit status testing logic a bit. --- pm/pm-functions.in | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'pm') diff --git a/pm/pm-functions.in b/pm/pm-functions.in index 60165d6..ad4676d 100644 --- a/pm/pm-functions.in +++ b/pm/pm-functions.in @@ -183,10 +183,9 @@ run_hooks() { fi log -n "${hook} $2: " hook_ok "$hook" && "${hook}" $2 - # if the hook exited with an unknown exit code, inhibit. - hook_exit_status $? || inhibit - # if we are not inhibited, record the last hook that ran. - inhibited || LAST_HOOK="$base" + # if the hook exited with an unknown exit code inhibit, + # otherwise record this as the last hook that ran. + hook_exit_status $? && LAST_HOOK="$base" || inhibit IFS="${nifs}" done IFS="${oifs}" -- cgit v1.2.3