Commit e3a6466c authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-sh-functions: fix sudo -- detection

parent 13092601
......@@ -263,8 +263,8 @@ set_sudo()
# use sudo if possible
if which sudo >/dev/null 2>/dev/null ; then
SUDO="sudo --"
# check for < 1.7 version which do not support --
sudo --help | grep -q " --" || SUDO="sudo"
# check for < 1.7 version which do not support -- (and --help possible too)
sudo -h | grep -q " --" || SUDO="sudo"
return
fi
......
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