diff options
| author | ruki <[email protected]> | 2022-05-29 16:31:15 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-05-29 16:31:15 +0800 |
| commit | 7e86c052217b255c95e3cd780bdee4153dd3c9bd (patch) | |
| tree | ffa10923c8a87fa9ae0afe04885f940037f6f5ad | |
| parent | d534e9346890b433de548294204b214e81319c78 (diff) | |
add run --detach
| -rw-r--r-- | xmake/actions/run/main.lua | 2 | ||||
| -rw-r--r-- | xmake/actions/run/xmake.lua | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/xmake/actions/run/main.lua b/xmake/actions/run/main.lua index 0b738aab6..50711ffbc 100644 --- a/xmake/actions/run/main.lua +++ b/xmake/actions/run/main.lua @@ -60,7 +60,7 @@ function _do_run_target(target) if option.get("debug") then debugger.run(targetfile, option.get("arguments")) else - os.execv(targetfile, option.get("arguments")) + os.execv(targetfile, option.get("arguments"), {detach = option.get("detach")}) end -- restore the previous directory diff --git a/xmake/actions/run/xmake.lua b/xmake/actions/run/xmake.lua index dce6724a1..8a9f21449 100644 --- a/xmake/actions/run/xmake.lua +++ b/xmake/actions/run/xmake.lua @@ -53,6 +53,7 @@ task("run") " xmake run -w .", " xmake run --workdir=`pwd`" } , {'j', "jobs", "kv", "1", "Set the number of parallel compilation jobs." } + , {nil, "detach", "k", nil, "Run targets in detached processes." } , {} , {nil, "target", "v", nil , "The target name. It will run all default targets if this parameter is not specified." , values = function (complete, opt) |
