From 43acada29cc447c9db2e801410ad6abc20d2276e Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 14 Apr 2022 00:39:38 +0800 Subject: add xmake.argv --- xmake/core/base/xmake.lua | 5 +++++ xmake/core/sandbox/modules/xmake.lua | 1 + xmake/modules/private/service/remote_build/action.lua | 1 + 3 files changed, 7 insertions(+) diff --git a/xmake/core/base/xmake.lua b/xmake/core/base/xmake.lua index 837742af2..e892a5a04 100644 --- a/xmake/core/base/xmake.lua +++ b/xmake/core/base/xmake.lua @@ -57,5 +57,10 @@ function xmake.luajit() return xmake._LUAJIT end +-- get command arguments +function xmake.argv() + return xmake._ARGV +end + -- return module: xmake return xmake diff --git a/xmake/core/sandbox/modules/xmake.lua b/xmake/core/sandbox/modules/xmake.lua index 70e5f5e36..d4e23984a 100644 --- a/xmake/core/sandbox/modules/xmake.lua +++ b/xmake/core/sandbox/modules/xmake.lua @@ -30,6 +30,7 @@ sandbox_xmake.branch = xmake.branch sandbox_xmake.programdir = xmake.programdir sandbox_xmake.programfile = xmake.programfile sandbox_xmake.luajit = xmake.luajit +sandbox_xmake.argv = xmake.argv -- return module return sandbox_xmake diff --git a/xmake/modules/private/service/remote_build/action.lua b/xmake/modules/private/service/remote_build/action.lua index 3eff3d11f..2f792ea93 100644 --- a/xmake/modules/private/service/remote_build/action.lua +++ b/xmake/modules/private/service/remote_build/action.lua @@ -31,4 +31,5 @@ function main() config.load() local client = remote_build_client() print("do remote action!") + print(xmake.argv()) end -- cgit v1.3.1