Add support for exclude filters in package installation

This commit is contained in:
MayaTheShy
2026-03-22 15:51:04 -04:00
parent a914786116
commit 9490b713ca

View File

@@ -78,6 +78,19 @@ local function install(name, isUpdate, ignoreDeps)
local packageDir = fs.combine('packages', name) local packageDir = fs.combine('packages', name)
local list = Git.list(manifest.repository) local list = Git.list(manifest.repository)
-- apply exclude filters from manifest
if manifest.exclude then
for path in pairs(list) do
for _, pattern in ipairs(manifest.exclude) do
if path:match(pattern) then
list[path] = nil
break
end
end
end
end
-- clear out contents before install/update -- clear out contents before install/update
-- TODO: figure out whether to run -- TODO: figure out whether to run
-- install/uninstall for the package -- install/uninstall for the package