diff options
| author | ruki <[email protected]> | 2022-04-14 00:39:38 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-04-14 00:39:38 +0800 |
| commit | 43acada29cc447c9db2e801410ad6abc20d2276e (patch) | |
| tree | 99e9022a13f09bf5de2f0411498698e6e537b9e6 | |
| parent | 12652bfd524697241b893d4a4e1672ecc3608f2c (diff) | |
add xmake.argv
| -rw-r--r-- | xmake/core/base/xmake.lua | 5 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/xmake.lua | 1 | ||||
| -rw-r--r-- | xmake/modules/private/service/remote_build/action.lua | 1 |
3 files changed, 7 insertions, 0 deletions
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 |
