X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=logq-function;h=410e683beb9b6ac360725c1c208ba4e4ac6c6297;hb=refs%2Fheads%2Fmaster;hp=a18319f680a598d63df02db2c435d22a18b2487b;hpb=a63fa3663362618d83c9e812e83d6593882fa0b8;p=log-quiet diff --git a/logq-function b/logq-function index a18319f..410e683 100644 --- a/logq-function +++ b/logq-function @@ -53,16 +53,13 @@ $help" printf "%s\n%s\n\n" "Log of $prettycommand" "$(date)" >"$file" if [[ $- != *x* ]]; then - echo "log $file = $@" + echo "log $file = $*" fi # we will propagate any errors - local logq_ret=$( - set +e - trap ERR - "$@" &>> "$file" - echo $? - ) + local logq_ret + logq_ret=0 + "$@" &>> "$file" || logq_ret=$? printf "\n%s\n%s\n" "$(date)" "----------------" >> "$file" if [[ $logq_ret != 0 ]]; then