mail_wrap_script.sh: fix command err code retrieval

This commit is contained in:
Alice Gaudon 2020-01-29 21:27:35 +01:00
parent 1d6c448599
commit a7ca83d1e8
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ touch /tmp/$FILE_ID.log
chmod a-rwx,u+r /tmp/$FILE_ID.log
$SCRIPT "$@" 2>&1 | tee /tmp/$FILE_ID.log
ERR=$?
ERR=${PIPESTATUS[0]}
OUTPUT=$(cat /tmp/$FILE_ID.log)
rm /tmp/$FILE_ID.log