fix: sudoif askpass handling

This commit is contained in:
Gunnar committed 2026-11-09 20:08:01 +01:00
1 parent a898e381d6
commit 9a29d365a9
1 file changed
+1 -1
+1 -1
View File
@@ -59,7 +59,7 @@ sudoif command *args:
function sudoif(){
if [[ "${UID}" -eq 0 ]]; then
"$@"
elif [[ "$(command -v sudo)" && -n "${SSH_ASKPASS:-}" ]] && [[ -n "${DISPLAY:-}" || -n "${WAYLAND_DISPLAY:-}" ]]; then
elif [[ "$(command -v sudo)" && -n "${SUDO_ASKPASS:-}" ]] && [[ -n "${DISPLAY:-}" || -n "${WAYLAND_DISPLAY:-}" ]]; then
/usr/bin/sudo --askpass "$@" || exit 1
elif [[ "$(command -v sudo)" ]]; then
/usr/bin/sudo "$@" || exit 1