Commit efcc60b0 authored by Vitaly Lipatov's avatar Vitaly Lipatov

set_sudo: allow sudo dialog if only stdout is not tty

parent 042cae30
...@@ -483,10 +483,10 @@ set_sudo() ...@@ -483,10 +483,10 @@ set_sudo()
return "$SUDO_TESTED" return "$SUDO_TESTED"
fi fi
# if input is a console # if input is a console and stderr is a console
if inputisatty && isatty && isatty2 ; then if inputisatty && isatty2 ; then
if ! $SUDO_CMD -n true ; then if ! $SUDO_CMD -n true ; then
info "Please enter sudo user password to use sudo in the current session." info "Please enter sudo user password to use sudo for all privileged operations in the current session." >&2
if ! $SUDO_CMD -l >/dev/null ; then if ! $SUDO_CMD -l >/dev/null ; then
[ "$nofail" = "nofail" ] || SUDO="fatal 'For this operation run epm under root, or install and tune sudo (http://altlinux.org/sudo)'" [ "$nofail" = "nofail" ] || SUDO="fatal 'For this operation run epm under root, or install and tune sudo (http://altlinux.org/sudo)'"
SUDO_TESTED="3" SUDO_TESTED="3"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment