mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 02:10:15 -04:00
fix: check queries in needs_update()
This commit is contained in:
parent
041f117fb1
commit
934b751f9d
1 changed files with 10 additions and 1 deletions
|
|
@ -111,7 +111,16 @@ end
|
||||||
---@return boolean
|
---@return boolean
|
||||||
local function needs_update(lang)
|
local function needs_update(lang)
|
||||||
local revision = get_target_revision(lang)
|
local revision = get_target_revision(lang)
|
||||||
return not revision or revision ~= get_installed_revision(lang)
|
if revision then
|
||||||
|
return revision ~= get_installed_revision(lang)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- No revision. Check the queries link to the same place
|
||||||
|
|
||||||
|
local queries = fs.joinpath(config.get_install_dir('queries'), lang)
|
||||||
|
local queries_src = M.get_package_path('runtime', 'queries', lang)
|
||||||
|
|
||||||
|
return uv.fs_realpath(queries) ~= uv.fs_realpath(queries_src)
|
||||||
end
|
end
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue