mirror of
https://github.com/theonedev/onedev.git
synced 2025-12-10 10:12:19 -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() {
|
||||
if [ `id | sed 's/^uid=//;s/(.*$//'` != "0" ] ; then
|
||||
if [ `id -u` != "0" ] ; then
|
||||
IS_ROOT=false
|
||||
else
|
||||
IS_ROOT=true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user