mirror of
https://github.com/neovim/neovim.git
synced 2026-04-21 06:45:37 +00:00
fix(pack): more advice for out-of-sync lockfile #38931
Problem: If the lockfile points to the revision that is not on disk, the `:checkhealth vim.pack` suggests to run `vim.pack.update()`. Although usually it should resolve the problem, it is not always the case: like if the state on disk is already the latest available. Solution: Add an extra suggestion with a more drastic measure by manually removing `rev` field from the lockfile for it to be repaired after the `:restart`.
This commit is contained in:
committed by
GitHub
parent
c1c2648284
commit
94c0e54e5b
@@ -128,7 +128,10 @@ local function check_plugin_lock_data(plug_name, lock_data)
|
||||
('Plugin %s is not at expected revision\n'):format(name_str)
|
||||
.. ('Expected: %s\nActual: %s\n'):format(lock_data.rev, head)
|
||||
.. 'To synchronize, restart Nvim and run '
|
||||
.. ('`vim.pack.update({ %s }, { offline = true })`'):format(name_str)
|
||||
.. ('`vim.pack.update({ %s }, { offline = true })`\n'):format(name_str)
|
||||
.. 'If there are no updates, delete `rev` lockfile entry (do not create trailing comma) '
|
||||
.. 'and restart Nvim to regenerate lockfile data\n'
|
||||
.. 'This can happen after updating plugins with read-only `$XDG_CONFIG_HOME`'
|
||||
)
|
||||
return false
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user