summaryrefslogtreecommitdiff
path: root/xmake/core/base/os.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-07-05 16:37:41 +0800
committerruki <[email protected]>2016-07-05 16:37:41 +0800
commit7af1dcdeed9e2ecbfc0ba0f4c34e52c99e1cdd89 (patch)
tree5d8b2b77ddca5024f350093f882c93a03f7a69e9 /xmake/core/base/os.lua
parent7f75b2583b94e733ba0b974860174a9021bc8767 (diff)
uses os.exec instead of os.execute
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 92b37c708..a25dcbdc0 100644
--- a/xmake/core/base/os.lua
+++ b/xmake/core/base/os.lua
@@ -298,7 +298,7 @@ function os.runv(shellname, argv)
local log = path.join(os.tmpdir(), "xmake.os.runv.log")
-- execute it
- local ok = os.execv(shellname, argv, log, log)
+ local ok = os.execv(shellname, table.wrap(argv), log, log)
if ok ~= 0 then
-- make errors
@@ -345,7 +345,7 @@ function os.execv(shellname, argv, outfile, errfile)
-- open command
local ok = -1
- local proc = process.openv(shellname, argv, outfile, errfile)
+ local proc = process.openv(shellname, table.wrap(argv), outfile, errfile)
if proc ~= nil then
-- wait process
@@ -369,7 +369,7 @@ function os.iorun(cmd)
local datafile = path.join(os.tmpdir(), "xmake.os.iorun.data")
-- run command
- local ok = os.execute(cmd .. string.format(" > %s 2>&1", datafile))
+ local ok = os.exec(cmd, datafile, datafile)
-- get results
local results = io.readall(datafile)