diff options
| author | ruki <[email protected]> | 2019-04-27 00:35:02 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-04-26 21:30:12 +0800 |
| commit | 600fb4fab529ae55a44ccdfd6045046309db8f4f (patch) | |
| tree | deac16fc701db19a4b5defac3705598c39d7a227 | |
| parent | 2b9fa9538efda1b9bb95674c510afd3082330971 (diff) | |
improve os.execv
| -rw-r--r-- | xmake/core/base/os.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index d63cefad3..65852b22c 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -612,8 +612,12 @@ function os.execv(program, argv, opt) -- uses the given environments? local envs = nil if opt.envs then - envs = {} + local envars = os.getenvs() for k, v in pairs(opt.envs) do + envars[k] = v + end + envs = {} + for k, v in pairs(envars) do table.insert(envs, k .. '=' .. v) end end |
