Minor Fixes

This commit is contained in:
Howard Wu 2022-09-23 16:43:50 +08:00
parent acd898cdf4
commit 97e5072d9f
2 changed files with 2 additions and 2 deletions

View File

@ -281,7 +281,7 @@ fi
require_su() {
if test "$(whoami)" != "root"; then
if [ -z "$SUDO" ] && [ "$($SUDO whoami)" != "root" ]; then
if [ -z "$SUDO" ] || [ "$($SUDO whoami)" != "root" ]; then
echo "ROOT/SUDO is required to run this script"
abort
fi

View File

@ -120,7 +120,7 @@ winetricks list-installed | grep -E "^msxml6" >/dev/null 2>&1 || {
}
WHIPTAIL=$(command -v whiptail 2>/dev/null)
DIALOG=$(command -v dialog 2>/dev/null)
DIALOG=${WHIPTAIL:DIALOG}
DIALOG=${WHIPTAIL:-$DIALOG}
function Radiolist {
declare -A o="$1"
shift