summaryrefslogtreecommitdiff
path: root/xmake/core/base/os.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-03-27 17:57:41 +0800
committerruki <[email protected]>2017-03-27 17:58:56 +0800
commit71d627e4aa9b5780e63fc6b679c74548844c5feb (patch)
tree46d8e8c874d045ca1f4d492b6edf82f5d716ae54 /xmake/core/base/os.lua
parent235bb967883ab0686bab731c8e94a4a0bb7677ab (diff)
fix io.read and io.write raw lua api
Diffstat (limited to 'xmake/core/base/os.lua')
-rw-r--r--xmake/core/base/os.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua
index 39be26ade..542751d54 100644
--- a/xmake/core/base/os.lua
+++ b/xmake/core/base/os.lua
@@ -443,7 +443,7 @@ function os.runv(shellname, argv)
if ok ~= 0 then
-- make errors
- local errors = io.readall(log)
+ local errors = io.readfile(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)
@@ -547,8 +547,8 @@ function os.iorunv(shellname, argv)
local ok = os.execv(shellname, argv, outfile, errfile)
-- get output and error data
- local outdata = io.readall(outfile)
- local errdata = io.readall(errfile)
+ local outdata = io.readfile(outfile)
+ local errdata = io.readfile(errfile)
-- remove the temporary output and error file
os.rm(outfile)