fix(pack): do not write the lockfile when installing from it #41031

Problem: Installing plugins during lockfile synchronization always
  writes the lockfile, even though its content is used during install.
  This might be a problem if the lockfile (itself or its parent
  directory) is not writeable (can only be read).

Solution: Do not write the lockfile when installing directly from it.
  This is okay since the `src` and `rev` are used directly from the
  lockfile and don't change at this step. While potential change in
  `version` (that must be written to the lockfile) is handled in other
  code path.
(cherry picked from commit 4bba83b4b7)
This commit is contained in:
Evgeni Chasnovski
2026-07-28 16:46:13 +03:00
committed by github-actions[bot]
parent 9a92f4a001
commit 0617f7020b
2 changed files with 11 additions and 2 deletions

View File

@@ -930,7 +930,6 @@ local function lock_sync(confirm, specs)
end)
git_ensure_exec()
install_list(to_install, confirm)
lock_write()
end
if #to_repair > 0 then