Fix sudo check in case it is aliased

"if [[ -e $( which sudo 2>&1 ) ]]" check fails if sudo is aliased to something else such as "nocorrect sudo". Using "command" eliminates this.
This commit is contained in:
Gökçen Eraslan 2013-05-15 17:11:23 +03:00
commit b69d02867a

View file

@ -13,7 +13,7 @@ else
fi
# Use sudo by default if it's installed
if [[ -e $( which sudo 2>&1 ) ]]; then
if [[ -e $( command which sudo 2>&1 ) ]]; then
use_sudo=1
fi