Skip to content

Commit 81ee02b

Browse files
committedDec 30, 2022
feat(startup): missing plugins will now install the versions in the lockfile if available. Fixes #138
1 parent 1283c2b commit 81ee02b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
 

Diff for: ‎lua/lazy/core/loader.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function M.setup()
4040
break
4141
end
4242
end
43-
require("lazy.manage").install({ wait = true })
43+
require("lazy.manage").install({ wait = true, lockfile = true })
4444
break
4545
end
4646
end

Diff for: ‎lua/lazy/manage/init.lua

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ local M = {}
1111
---@field mode? string
1212
---@field plugins? (LazyPlugin|string)[]
1313
---@field concurrency? number
14+
---@field lockfile? boolean
1415

1516
---@param ropts RunnerOpts
1617
---@param opts? ManagerOpts
@@ -74,7 +75,7 @@ function M.install(opts)
7475
return M.run({
7576
pipeline = {
7677
"git.clone",
77-
"git.checkout",
78+
{ "git.checkout", lockfile = opts.lockfile },
7879
"plugin.docs",
7980
"wait",
8081
"plugin.build",
@@ -88,7 +89,7 @@ function M.install(opts)
8889
end)
8990
end
9091

91-
---@param opts? ManagerOpts|{lockfile?:boolean}
92+
---@param opts? ManagerOpts
9293
function M.update(opts)
9394
opts = M.opts(opts, { mode = "update" })
9495
return M.run({

0 commit comments

Comments
 (0)
Please sign in to comment.