enable the ability to add local filesystem plugins

This commit is contained in:
2025-04-25 23:15:57 -05:00
parent 381f473a15
commit d030a5c39b
4 changed files with 44 additions and 1 deletions

View File

@ -1,5 +1,6 @@
local logger = require('dep.log')
local git = require('dep.git')
local fs = require('dep.fs')
local packager = require('dep.package')
local h = require('dep.helpers')
@ -143,7 +144,13 @@ function M.synctree(tree, cb)
for _, package in pairs(tree) do
local co = coroutine.create(function()
git.sync(package, done)
-- if the package provided prefers a local source then use the local
-- source instead of the git repository
if package.path then
fs:sync(package, done)
else
git.sync(package, done)
end
end)
coroutine.resume(co)
end