Revert commit to run command a second time in errshow

This commit is contained in:
natemaia 2019-12-26 20:53:34 -08:00
parent 969cdf6c74
commit 343e9d88b1

View File

@ -2448,32 +2448,16 @@ errshow()
local fatal=$1
shift # always shift off the fatal level arg
# try to rerun the command to make sure it's consistently failing
local err="$(errmsg)"
sleep 1 && $1 2> "$ERR"
[ $? -eq 0 ] && return 0
local err2="$(errmsg)"
if [[ $err == $err2 ]]; then # no need to show duplicate output
local txt="\nCommand: $1\n\n\n\nError:\n$err\n\n"
else
local txt="\nCommand: $1\n\n\n\nFirst run error:\n$err\n\nSecond run error:\n$err2\n\n"
fi
local txt="\nCommand: $1\n\n\n\nError:\n$(errmsg)\n\n"
tput cnorm
if (( fatal )); then
yesno "Install Error" "${txt}Errors at this stage must be fixed before the install can continue.\n$_errchoice" \
"Handle normally" "Continue, it's fixed" || return 0
yesno "Install Error" "${txt}Errors at this stage must be fixed before the install can continue.\n$_errchoice" "Handle normally" "Continue, it's fixed" ||
return 0
[[ -r $DBG && $TERM == 'linux' ]] && less "$DBG"
die 1
fi
yesno "Install Error" "${txt}Errors at this stage may be fixed or ignored depending on the error.\n$_errchoice" \
"Handle normally" "Continue, it's fixed" && return 1
yesno "Install Error" "${txt}Errors at this stage may be fixed or ignored depending on the error.\n$_errchoice" "Handle normally" "Continue, it's fixed" &&
return 1
return 0
}