diff options
| author | ruki <[email protected]> | 2019-08-16 22:32:05 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-08-16 17:49:18 +0800 |
| commit | 11ae86985a2d2d8811d34eff4bbd37e3582aafc9 (patch) | |
| tree | c23759758dd97390beaa5522b6aec6175b6f81bc /xmake/core/sandbox/modules/process.lua | |
| parent | 9588bc931c37322955165eb085c83d6e2dd4fee3 (diff) | |
improve process.open
Diffstat (limited to 'xmake/core/sandbox/modules/process.lua')
| -rw-r--r-- | xmake/core/sandbox/modules/process.lua | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/xmake/core/sandbox/modules/process.lua b/xmake/core/sandbox/modules/process.lua index da42c4b85..f1d73cb00 100644 --- a/xmake/core/sandbox/modules/process.lua +++ b/xmake/core/sandbox/modules/process.lua @@ -28,7 +28,7 @@ local vformat = require("sandbox/modules/vformat") local sandbox_process = sandbox_process or {} -- open process -function sandbox_process.open(command, outfile, errfile) +function sandbox_process.open(command, opt) -- check assert(command) @@ -36,18 +36,8 @@ function sandbox_process.open(command, outfile, errfile) -- format command first command = vformat(command) - -- format output file if exists - if outfile then - outfile = vformat(outfile) - end - - -- format error file if exists - if errfile then - errfile = vformat(errfile) - end - -- open process - local proc = process.open(command, outfile, errfile) + local proc = process.open(command, opt) if not proc then raise("open process(%s) failed!", command) end |
