summaryrefslogtreecommitdiff
path: root/xmake/core/base/os.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-05-20 09:53:20 +0800
committerruki <[email protected]>2016-05-20 09:53:20 +0800
commit84a5dfb452cf206a449cc6e66fab8af915cf4e6c (patch)
tree47f25bdf31cccf0569a44daffd8d024c4f1692f6 /xmake/core/base/os.lua
parent04e09343f457089ddc7b952fad6df180eb0cbc58 (diff)
fix multi-task build bug
Diffstat (limited to 'xmake/core/base/os.lua')
-rw-r--r--xmake/core/base/os.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua
index c3e3b70cb..ab073e914 100644
--- a/xmake/core/base/os.lua
+++ b/xmake/core/base/os.lua
@@ -231,6 +231,13 @@ function os.cd(dir)
return true
end
+-- generate the temporary file path
+function os.tmpfile()
+
+ -- make it
+ return path.join(os.tmpdir(), path.filename(os.tmpname()))
+end
+
-- run shell
function os.run(cmd)
@@ -261,7 +268,7 @@ end
function os.corun(cmd)
-- make temporary log file
- local log = os.tmpname()
+ local log = os.tmpfile()
-- open command
local p = process.open(cmd, log, log)