From fd32c8b4636d8b9d6344e34cb35c434b47f1aa24 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Mon, 20 May 2024 18:04:29 -0400 Subject: [PATCH] simplify for shellcheck --- logq-function | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/logq-function b/logq-function index 3744d10..410e683 100644 --- a/logq-function +++ b/logq-function @@ -58,12 +58,8 @@ $help" # we will propagate any errors local logq_ret - logq_ret=$( - set +e - trap ERR - "$@" &>> "$file" - echo $? - ) + logq_ret=0 + "$@" &>> "$file" || logq_ret=$? printf "\n%s\n%s\n" "$(date)" "----------------" >> "$file" if [[ $logq_ret != 0 ]]; then -- 2.30.2