diff options
| author | ruki <[email protected]> | 2021-04-13 22:42:22 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-04-13 22:42:22 +0800 |
| commit | 84b64c4ecffe6ed4a498efa8116271ecba78e52d (patch) | |
| tree | 4f03fff7f04d6fd648b9bfce26348463b4bc7423 /xmake/modules/private/action/require/impl/install_packages.lua | |
| parent | 317745583da0e5c940f6e300c5f6163eb800efbf (diff) | |
improve envs
Diffstat (limited to 'xmake/modules/private/action/require/impl/install_packages.lua')
| -rw-r--r-- | xmake/modules/private/action/require/impl/install_packages.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/private/action/require/impl/install_packages.lua b/xmake/modules/private/action/require/impl/install_packages.lua index efc0c73a9..8bec808c6 100644 --- a/xmake/modules/private/action/require/impl/install_packages.lua +++ b/xmake/modules/private/action/require/impl/install_packages.lua @@ -429,9 +429,10 @@ function main(requires, opt) runjobs("fetch_packages", function (index) local instance = packages[index] if instance and (not option.get("force") or (option.get("shallow") and not instance:is_toplevel())) then + local oldenvs = os.getenvs() instance:envs_enter() instance:fetch() - instance:envs_leave() + os.setenvs(oldenvs) end end, {total = #packages}) |
