feat(startup): missing plugins will now install the versions in the lockfile if available. Fixes #138

This commit is contained in:
Folke Lemaitre 2022-12-30 09:17:46 +01:00
parent 1283c2b288
commit 81ee02b8f6
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
2 changed files with 4 additions and 3 deletions

View File

@ -40,7 +40,7 @@ function M.setup()
break break
end end
end end
require("lazy.manage").install({ wait = true }) require("lazy.manage").install({ wait = true, lockfile = true })
break break
end end
end end

View File

@ -11,6 +11,7 @@ local M = {}
---@field mode? string ---@field mode? string
---@field plugins? (LazyPlugin|string)[] ---@field plugins? (LazyPlugin|string)[]
---@field concurrency? number ---@field concurrency? number
---@field lockfile? boolean
---@param ropts RunnerOpts ---@param ropts RunnerOpts
---@param opts? ManagerOpts ---@param opts? ManagerOpts
@ -74,7 +75,7 @@ function M.install(opts)
return M.run({ return M.run({
pipeline = { pipeline = {
"git.clone", "git.clone",
"git.checkout", { "git.checkout", lockfile = opts.lockfile },
"plugin.docs", "plugin.docs",
"wait", "wait",
"plugin.build", "plugin.build",
@ -88,7 +89,7 @@ function M.install(opts)
end) end)
end end
---@param opts? ManagerOpts|{lockfile?:boolean} ---@param opts? ManagerOpts
function M.update(opts) function M.update(opts)
opts = M.opts(opts, { mode = "update" }) opts = M.opts(opts, { mode = "update" })
return M.run({ return M.run({