diff options
author | Victor Lowther <victor.lowther@gmail.com> | 2008-06-08 19:17:36 -0500 |
---|---|---|
committer | Victor Lowther <victor.lowther@gmail.com> | 2008-06-08 19:17:36 -0500 |
commit | f89c73694e5c5a057f06460410d278f3727e5225 (patch) | |
tree | 46e4ec2be180070496c58cd17e4259a82563ece8 /pm | |
parent | 82c7efe54c7b04f2cf5bf73d9b0bf1c32fb26f56 (diff) |
Simplify hook exit status testing logic a bit.
Diffstat (limited to 'pm')
-rw-r--r-- | pm/pm-functions.in | 7 |
1 files changed, 3 insertions, 4 deletions
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}" |