Skip to content

Commit b4e6314

Browse files
committed
Changes requested by Gemini
1 parent 8f1c042 commit b4e6314

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

script/cli/doc/export.lua

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,7 @@ end
274274
---@async
275275
---@return table globals
276276
function export.gatherGlobals()
277-
local globalsMap = vm.getExportableGlobals()
278-
local globalsTable = {}
279-
for _, g in pairs(globalsMap) do
280-
table.insert(globalsTable, g)
281-
end
282-
return globalsTable
277+
return util.valuesOf(vm.getExportableGlobals())
283278
end
284279

285280
---builds a lua table of based on `globals` and their elements

script/vm/global.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,9 @@ end
516516
function vm.getExportableGlobals()
517517
local exportableGlobals = {}
518518
for key, global in pairs(allGlobals) do
519-
if not string.find(global.uri, METAPATH, 1, true) then
519+
--If the source uri for the global matches the global variable METAPATH
520+
--then the global is a builtin Lua language feature and should not be exported
521+
if global.uri and not string.find(global.uri, METAPATH, 1, true) then
520522
exportableGlobals[key] = global
521523
end
522524
end

0 commit comments

Comments
 (0)