Set flag so trap doesn't repeat info

This commit is contained in:
William Wernert
2021-05-17 16:02:52 -04:00
parent b89091cc7d
commit 3f238f7a4a
2 changed files with 2 additions and 0 deletions

View File

@@ -340,6 +340,7 @@ run_check_net_err() {
fi
if [[ $exit_code -ne 0 ]]; then
ERR_HANDLED=true
echo "Command failed with error $exit_code"
echo "$err_msg"
exit $exit_code

View File

@@ -30,6 +30,7 @@ check_err() {
local exit_code=$1
local err_msg="Unhandled error occured, please check $SOUP_LOG for details."
[[ $ERR_HANDLED == true ]] && exit $exit_code
if [[ $exit_code -ne 0 ]]; then
printf '%s' "Soup failed with error $exit_code: "
case $exit_code in