mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-19 21:06:46 +00:00
Merge branch 'folke:main' into patch-1
This commit is contained in:
commit
b1a2b1c03b
7 changed files with 124 additions and 86 deletions
|
@ -80,6 +80,7 @@ function M.install(opts)
|
|||
opts = M.opts(opts, { mode = "install" })
|
||||
return M.run({
|
||||
pipeline = {
|
||||
"plugin.exists",
|
||||
"git.clone",
|
||||
{ "git.checkout", lockfile = opts.lockfile },
|
||||
"plugin.docs",
|
||||
|
@ -108,6 +109,7 @@ function M.update(opts)
|
|||
opts = M.opts(opts, { mode = "update" })
|
||||
return M.run({
|
||||
pipeline = {
|
||||
"plugin.exists",
|
||||
"git.origin",
|
||||
"git.branch",
|
||||
"git.fetch",
|
||||
|
@ -147,6 +149,7 @@ function M.check(opts)
|
|||
opts = opts or {}
|
||||
return M.run({
|
||||
pipeline = {
|
||||
"plugin.exists",
|
||||
{ "git.origin", check = true },
|
||||
"git.fetch",
|
||||
"git.status",
|
||||
|
|
|
@ -97,4 +97,15 @@ M.docs = {
|
|||
end,
|
||||
}
|
||||
|
||||
M.exists = {
|
||||
skip = function(plugin)
|
||||
return not plugin._.is_local
|
||||
end,
|
||||
run = function(self)
|
||||
if not Util.file_exists(self.plugin.dir) then
|
||||
self:error("Local plugin does not exist at `" .. self.plugin.dir .. "`")
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue