diff options
Diffstat (limited to 'xmake/core/base/os.lua')
| -rw-r--r-- | xmake/core/base/os.lua | 9 |
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) |
