diff options
| author | ruki <[email protected]> | 2020-02-03 22:51:06 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-02-07 22:45:56 +0800 |
| commit | cf9970fddd580f8b9bb8ed25d6d9cfa67a607b69 (patch) | |
| tree | 57dda8e994431a59f96f44fec83d416fb4db0db6 /xmake/core/base/os.lua | |
| parent | ccfe7ed01bd603f4435ce6463ecf267f49ddd6fe (diff) | |
improve to open process and support pipe
Diffstat (limited to 'xmake/core/base/os.lua')
| -rw-r--r-- | xmake/core/base/os.lua | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index 4a31db46c..46a0ad1a1 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -608,7 +608,7 @@ end -- @param program "clang", "xcrun -sdk macosx clang", "~/dir/test\ xxx/clang" -- filename "clang", "xcrun"", "~/dir/test\ xxx/clang" -- @param argv the arguments --- @param opt the options, e.g. {wildcards = false, stdout = outfile, stderr = errfile, +-- @param opt the options, e.g. {wildcards = false, stdout = filepath/file/pipe, stderr = filepath/file/pipe, -- envs = {PATH = "xxx;xx", CFLAGS = "xx"}} -- function os.execv(program, argv, opt) @@ -651,17 +651,7 @@ function os.execv(program, argv, opt) end -- init open options - local openopt = {envs = envs} - if type(opt.stdout) == "table" then - openopt.outfile = opt.stdout._FILE - else - openopt.outpath = opt.stdout - end - if type(opt.stderr) == "table" then - openopt.errfile = opt.stderr._FILE - else - openopt.errpath = opt.stderr - end + local openopt = {envs = envs, stdout = opt.stdout, stderr = opt.stderr} -- open command local ok = -1 |
