summaryrefslogtreecommitdiff
path: root/xmake/core/base/os.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-03-15 18:23:54 +0800
committerruki <[email protected]>2017-03-15 18:23:54 +0800
commitbe0535a48070ab2a8f11caf2f034e55262a6b448 (patch)
tree3d0f60a1f5fa9a9da5a84920225b4f88c7d2dd97 /xmake/core/base/os.lua
parent3f030e329d50d816df9d1a17e8283012cca7d710 (diff)
add os.run error info
Diffstat (limited to 'xmake/core/base/os.lua')
-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 9fcae713a..cfbc00611 100644
--- a/xmake/core/base/os.lua
+++ b/xmake/core/base/os.lua
@@ -444,6 +444,13 @@ function os.runv(shellname, argv)
-- make errors
local errors = io.readall(log)
+ if not errors or #errors == 0 then
+ if argv ~= nil then
+ errors = string.format("runv(%s %s) failed(%d)!", shellname, table.concat(argv, ' '), ok)
+ else
+ errors = string.format("runv(%s) failed(%d)!", shellname, ok)
+ end
+ end
-- remove the temporary log file
os.rm(log)