summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/base/os.lua7
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)