mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(install): don't make "installed" status persistent
Problem: Setting `install_status` to "installed" skips any future install or update operation (even if forced). In particular, this breaks `:TSUpdate` when calling `install()` in config files. Solution: Don't set "installed" when skipping install and clear status on successful operations.
This commit is contained in:
parent
f14b356d54
commit
d116118add
1 changed files with 1 additions and 2 deletions
|
|
@ -456,7 +456,6 @@ local install_status = {} ---@type table<string,InstallStatus?>
|
|||
---@return InstallStatus status
|
||||
local function install_lang(lang, cache_dir, install_dir, force, generate)
|
||||
if not force and vim.list_contains(config.get_installed(), lang) then
|
||||
install_status[lang] = 'installed'
|
||||
return 'installed'
|
||||
end
|
||||
|
||||
|
|
@ -475,6 +474,7 @@ local function install_lang(lang, cache_dir, install_dir, force, generate)
|
|||
|
||||
local status = install_status[lang]
|
||||
assert(status and status ~= 'installing')
|
||||
install_status[lang] = nil
|
||||
return status
|
||||
end
|
||||
|
||||
|
|
@ -570,7 +570,6 @@ end)
|
|||
---@return string? err
|
||||
local function uninstall_lang(logger, lang, parser, queries)
|
||||
logger:debug('Uninstalling ' .. lang)
|
||||
install_status[lang] = nil
|
||||
|
||||
if fn.filereadable(parser) == 1 then
|
||||
logger:debug('Unlinking ' .. parser)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue