summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpportunity <[email protected]>2026-04-10 17:26:32 +0800
committerGitHub <[email protected]>2026-04-10 17:26:32 +0800
commit3a821a9fe58b4901db1fc96db810bc7d50b73049 (patch)
tree7d0fab545ca2bd4b08a6c8e0d17b92765a15f47a
parent023b573d3117f1381dce5c92a261a6d831fee996 (diff)
feat: 支持 XMAKE_ROOT=yes/true
-rw-r--r--xmake/core/main.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/core/main.lua b/xmake/core/main.lua
index 1c51342b9..f3ad904f5 100644
--- a/xmake/core/main.lua
+++ b/xmake/core/main.lua
@@ -258,7 +258,7 @@ end
-- limit root? @see https://github.com/xmake-io/xmake/pull/4513
function main._limit_root()
- return not option.get("root") and os.getenv("XMAKE_ROOT") ~= 'y' and os.host() ~= 'haiku'
+ return not option.get("root") and option.boolean(os.getenv("XMAKE_ROOT")) ~= true and os.host() ~= 'haiku'
end
-- run task