More portable EUID check (#102)
This commit is contained in:
parent
cfded4bb8a
commit
f9532cb194
|
@ -94,7 +94,7 @@ main() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local maybe_sudo=""
|
local maybe_sudo=""
|
||||||
if [ "$EUID" -ne 0 ] && command -v sudo > /dev/null; then
|
if [ "$(id -u)" -ne 0 ] && command -v sudo > /dev/null; then
|
||||||
maybe_sudo="sudo"
|
maybe_sudo="sudo"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue