summaryrefslogtreecommitdiff
path: root/xmake/core/base/os.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/base/os.lua')
-rw-r--r--xmake/core/base/os.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua
index cfbc00611..39be26ade 100644
--- a/xmake/core/base/os.lua
+++ b/xmake/core/base/os.lua
@@ -590,5 +590,17 @@ function os.isexec(filepath)
return os.isfile(filepath)
end
+-- get sudo program name for running program with administrator permission
+function os.sudo()
+
+ -- on windows?
+ if xmake._HOST == "windows" then
+ -- TODO
+ -- add sudo.bat
+ else
+ return "sudo"
+ end
+end
+
-- return module
return os