summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/main.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/xmake/core/main.lua b/xmake/core/main.lua
index 615df5355..bb883d659 100644
--- a/xmake/core/main.lua
+++ b/xmake/core/main.lua
@@ -259,14 +259,12 @@ function main.entry()
-- check run command as root
if not option.get("root") and os.getenv("XMAKE_ROOT") ~= 'y' then
if os.isroot() then
- if not privilege.store() or os.isroot() then
- errors = [[Running xmake as root is extremely dangerous and no longer supported.
+ errors = [[Running xmake as root is extremely dangerous and no longer supported.
As xmake does not drop privileges on installation you would be giving all
build scripts full access to your system.
Or you can add `--root` option or XMAKE_ROOT=y to allow run as root temporarily.
- ]]
- return main._exit(false, errors)
- end
+ ]]
+ return main._exit(false, errors)
end
end