From fd8bb4f1d42f6ef6c37bda226492befe267d8a36 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 21 Feb 2020 23:04:50 +0800 Subject: improve os.iorunv errors --- xmake/core/base/os.lua | 7 +++++++ 1 file changed, 7 insertions(+) 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) -- cgit v1.3.1