Improve stability

This commit is contained in:
Muhammad Rivan 2021-06-12 10:31:40 +07:00
parent fd2c80cc89
commit db68bb721e
No known key found for this signature in database
GPG key ID: C56A200FD936FAAA
2 changed files with 5 additions and 5 deletions

View file

@ -629,9 +629,9 @@ sudo() {
fi
if [[ -p /dev/stdin ]]; then
${SUDO_BIN} "${@}" < /dev/stdin || result="${?}"
${SUDO_BIN} "${@}" < /dev/stdin; result="${?}"
else
${SUDO_BIN} "${@}" || result="${?}"
${SUDO_BIN} "${@}"; result="${?}"
fi
[[ "${result}" != "0" ]] && WHITESUR_COMMAND="${*}"
@ -649,9 +649,9 @@ udo() {
fi
if [[ -p /dev/stdin ]]; then
${SUDO_BIN} -u "${MY_USERNAME}" "${@}" < /dev/stdin || result="${?}"
${SUDO_BIN} -u "${MY_USERNAME}" "${@}" < /dev/stdin; result="${?}"
else
${SUDO_BIN} -u "${MY_USERNAME}" "${@}" || result="${?}"
${SUDO_BIN} -u "${MY_USERNAME}" "${@}"; result="${?}"
fi
[[ "${result}" != "0" ]] && WHITESUR_COMMAND="${*}"

View file

@ -114,7 +114,7 @@ install_swupd_packages() {
prepare_install_apt_packages() {
local status="1"
sudo apt update -y; sudo apt install -y "${@}" || status="${?}"
sudo apt update -y; sudo apt install -y "${@}"; status="${?}"
if [[ "${status}" == "100" ]]; then
prompt -w "\n APT: Your repo lists might be broken"