From 3515cb518f61c02b41cd3a8d8135c9a5862a982f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 23 Jun 2024 22:04:32 +0200 Subject: [PATCH] fix(pkg): make sure state dir exists --- lua/lazy/pkg/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazy/pkg/init.lua b/lua/lazy/pkg/init.lua index 781f66a..c43a53f 100644 --- a/lua/lazy/pkg/init.lua +++ b/lua/lazy/pkg/init.lua @@ -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