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/environment.lua | |
| parent | 317745583da0e5c940f6e300c5f6163eb800efbf (diff) | |
improve envs
Diffstat (limited to 'xmake/modules/private/action/require/impl/environment.lua')
| -rw-r--r-- | xmake/modules/private/action/require/impl/environment.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/private/action/require/impl/environment.lua b/xmake/modules/private/action/require/impl/environment.lua index ae6950de3..115f263aa 100644 --- a/xmake/modules/private/action/require/impl/environment.lua +++ b/xmake/modules/private/action/require/impl/environment.lua @@ -54,6 +54,7 @@ function enter() end -- enter the environments of installed packages + _g._OLDENVS = os.getenvs() for _, instance in ipairs(packages) do instance:envs_enter() end @@ -64,9 +65,8 @@ end function leave() -- leave the environments of installed packages - for _, instance in irpairs(_g._PACKAGES) do - instance:envs_leave() - end + os.setenvs(_g._OLDENVS) + _g._OLDENVS = nil _g._PACKAGES = nil -- leave the environments of git |
