From 0c469ed3843a73b3fbf73640b75715f72fc7be53 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Wed, 17 Jul 2019 19:25:44 +0800 Subject: fix setenv --- xmake/core/base/os.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index 6be21560c..53670360f 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -534,10 +534,10 @@ function os.runv(program, argv, opt) opt = opt or {} -- make temporary log file - local log = os.tmpfile() + local logfile = os.tmpfile() -- execute it - local ok = os.execv(program, argv, table.join(opt, {stdout = log, stderr = log})) + local ok = os.execv(program, argv, table.join(opt, {stdout = logfile, stderr = logfile})) if ok ~= 0 then -- make errors @@ -551,14 +551,14 @@ function os.runv(program, argv, opt) end -- remove the temporary log file - os.rm(log) + os.rm(logfile) -- failed return false, errors end -- remove the temporary log file - os.rm(log) + os.rm(logfile) -- ok return true @@ -948,9 +948,9 @@ function os.setenv(name, ...) local values = {...} if #values <= 1 then -- keep compatible with original implementation - os._setenv(name, values[1] or "") + return os._setenv(name, values[1] or "") else - os._setenv(path.joinenv(values)) + return os._setenv(path.joinenv(values)) end end -- cgit v1.3.1