fix(install): create cache dir if not existing

This commit is contained in:
Christian Clason 2025-05-26 14:42:03 +02:00 committed by Christian Clason
parent 1043871ef4
commit 61b0a05ec0
2 changed files with 4 additions and 3 deletions

View file

@ -440,6 +440,10 @@ local function install(languages, options)
options = options or {}
local cache_dir = fs.normalize(fn.stdpath('cache'))
if not vim.uv.fs_stat(cache_dir) then
vim.fn.mkdir(cache_dir, 'p')
end
local install_dir = config.get_install_dir('parser')
local task_funs = {} ---@type async.TaskFun[]

View file

@ -18,9 +18,6 @@ end
vim.opt.runtimepath:append('.')
-- needed on CI
vim.fn.mkdir(vim.fn.stdpath('cache'), 'p')
---@type async.Task
local task = update and require('nvim-treesitter').update('all')
or require('nvim-treesitter').install(