fix: sudoif askpass handling
This commit is contained in:
1 parent
a898e381d6
commit
9a29d365a9
1 file changed
+1
-1
@@ -59,7 +59,7 @@ sudoif command *args:
|
|||||||
function sudoif(){
|
function sudoif(){
|
||||||
if [[ "${UID}" -eq 0 ]]; then
|
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
|
/usr/bin/sudo --askpass "$@" || exit 1
|
||||||
elif [[ "$(command -v sudo)" ]]; then
|
elif [[ "$(command -v sudo)" ]]; then
|
||||||
/usr/bin/sudo "$@" || exit 1
|
/usr/bin/sudo "$@" || exit 1
|
||||||
|
|||||||
Reference in new issue
Block a user