some bug fix

This commit is contained in:
levasseur
2021-09-08 18:23:34 +02:00
parent 9aa7244824
commit e93a3b9ed6
3 changed files with 9 additions and 6 deletions

View File

@@ -82,16 +82,19 @@ function backtrace
# ------------------------------------------------------------------------------
# Execute command outside of error control
# Execute command outside of error control, echoes ouput error code
noerror()
{
set +o errexit
trap - ERR
$@
local code=$?
trap "error ${LINENO}" ERR
set -o errexit
echo $code
}