From: Ian Kelling Date: Mon, 20 May 2024 22:04:29 +0000 (-0400) Subject: simplify for shellcheck X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;ds=sidebyside;h=refs%2Fheads%2Fmaster;p=log-quiet simplify for shellcheck --- 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