mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
fix(install): create cache dir if not existing
This commit is contained in:
parent
1043871ef4
commit
61b0a05ec0
2 changed files with 4 additions and 3 deletions
|
|
@ -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[]
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue