mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +01:00
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:
parent
27c6becffd
commit
b69d02867a
1 changed files with 1 additions and 1 deletions
|
|
@ -13,7 +13,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Use sudo by default if it's installed
|
# 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
|
use_sudo=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue