diff options
| author | ruki <[email protected]> | 2020-02-21 23:04:50 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-02-21 12:29:01 +0800 |
| commit | fd8bb4f1d42f6ef6c37bda226492befe267d8a36 (patch) | |
| tree | 51744e84e3aeffef6ee75be4899fee4721929d66 | |
| parent | 2a0f498a465f382a3f595b2bdf87f6d2975b7874 (diff) | |
improve os.iorunv errors
| -rw-r--r-- | xmake/core/base/os.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index 9faa61d59..52e9bf075 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -774,6 +774,13 @@ function os.iorunv(program, argv, opt) -- run command local ok, errors = os.execv(program, argv, table.join(opt, {stdout = outfile, stderr = errfile})) + if ok == nil then + local cmd = program + if argv then + cmd = cmd .. " " .. os.args(argv) + end + errors = string.format("cannot runv(%s), error: %s", cmd, errors and errors or "unknown") + end -- get output and error data local outdata = io.readfile(outfile) |
