Add support for exclude filters in package installation
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user