mirror of
https://github.com/theonedev/onedev.git
synced 2025-12-11 13:58:37 -06:00
fix: Logic to check root incorrect in agent.sh running on Chinese version of Ubuntu (OD-2538)
This commit is contained in:
parent
7b8e9f7cba
commit
afddedc308
@ -216,7 +216,7 @@ gettext() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
checkIsRoot() {
|
checkIsRoot() {
|
||||||
if [ `id | sed 's/^uid=//;s/(.*$//'` != "0" ] ; then
|
if [ `id -u` != "0" ] ; then
|
||||||
IS_ROOT=false
|
IS_ROOT=false
|
||||||
else
|
else
|
||||||
IS_ROOT=true
|
IS_ROOT=true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user