fix(pkg): make sure state dir exists

This commit is contained in:
Folke Lemaitre 2024-06-23 22:04:32 +02:00
parent 5a311d04f6
commit 70f54078e0
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 1 additions and 0 deletions

View File

@ -48,6 +48,7 @@ function M.update()
end
end
local code = "return " .. Util.dump({ version = M.VERSION, specs = M.cache })
vim.fn.mkdir(vim.fn.fnamemodify(Config.options.pkg.cache, ":h"), "p")
Util.write_file(Config.options.pkg.cache, code)
M.dirty = false
M.cache = nil