Capture fs locally before setting _ENV=nil in json.lua

This commit is contained in:
MayaTheShy
2026-03-22 15:19:33 -04:00
parent 857c0e252d
commit 5775954d7c

View File

@@ -39,8 +39,8 @@ if register_global_module_table then
_G[global_module_name] = json
end
-- this was incompatible because we use fs later
--local _ENV = nil -- blocking globals in Lua 5.2
local fs = fs
local _ENV = nil -- blocking globals in Lua 5.2
pcall (function()
-- Enable access to blocked metatables.