summaryrefslogtreecommitdiff
path: root/xmake/actions/build/statistics.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/actions/build/statistics.lua')
-rw-r--r--xmake/actions/build/statistics.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/actions/build/statistics.lua b/xmake/actions/build/statistics.lua
index 84a2a5cc5..d345b0fb4 100644
--- a/xmake/actions/build/statistics.lua
+++ b/xmake/actions/build/statistics.lua
@@ -111,7 +111,7 @@ function main()
platform.load(config.plat())
-- enter the environments of git
- packagenv.enter("git")
+ local oldenvs = packagenv.enter("git")
-- get the project directory name
local projectname = path.basename(os.projectdir())
@@ -139,5 +139,5 @@ function main()
end
-- leave the environments of git
- packagenv.leave("git")
+ os.setenvs(oldenvs)
end