summaryrefslogtreecommitdiff
path: root/xmake/core/base/os.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-08-17 21:28:53 +0800
committerruki <[email protected]>2019-08-17 21:28:53 +0800
commitadef5373cbd290f0d679c449d06dcb92dbfe3325 (patch)
tree04875f172db651567ebd98beea0756dffc0dc219 /xmake/core/base/os.lua
parent51dcf34216824a7d5096cad03b5b04964e8ceba8 (diff)
enable vs_unicode_output
Diffstat (limited to 'xmake/core/base/os.lua')
-rw-r--r--xmake/core/base/os.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua
index 81d7eb3ec..06ee3a837 100644
--- a/xmake/core/base/os.lua
+++ b/xmake/core/base/os.lua
@@ -614,10 +614,12 @@ function os.execv(program, argv, opt)
-- uses the given environments?
local envs = nil
- if opt.envs then
+ if opt.envs or opt.vs_unicode_output then
local envars = os.getenvs()
- for k, v in pairs(opt.envs) do
- envars[k] = v
+ if opt.envs then
+ for k, v in pairs(opt.envs) do
+ envars[k] = v
+ end
end
envs = {}
for k, v in pairs(envars) do
@@ -627,7 +629,7 @@ function os.execv(program, argv, opt)
-- open command
local ok = -1
- local proc = process.openv(filename, argv, {outpath = opt.stdout, errpath = opt.stderr, envs = envs})
+ local proc = process.openv(filename, argv, {outpath = opt.stdout, errpath = opt.stderr, envs = envs, vs_unicode_output = opt.vs_unicode_output})
if proc ~= nil then
-- wait process
@@ -682,6 +684,7 @@ end
-- run command with arguments and return output and error data
function os.iorunv(program, argv, opt)
+ -- init options
opt = opt or {}
-- make temporary output and error file