simplify for shellcheck master
authorIan Kelling <iank@fsf.org>
Mon, 20 May 2024 22:04:29 +0000 (18:04 -0400)
committerIan Kelling <iank@fsf.org>
Mon, 20 May 2024 22:04:29 +0000 (18:04 -0400)
logq-function

index 3744d101ffeab7e34cff643396d8377ded56175c..410e683beb9b6ac360725c1c208ba4e4ac6c6297 100644 (file)
@@ -58,12 +58,8 @@ $help"
 
   # we will propagate any errors
   local logq_ret
 
   # 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
   printf "\n%s\n%s\n" "$(date)" "----------------" >> "$file"
 
   if [[ $logq_ret != 0 ]]; then