From 70f54078e0a54f56f40ebf814c0aa12f751dafe9 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