diff --git a/dots/.config/nvim/lua/plugins/configs/image.lua b/dots/.config/nvim/lua/plugins/configs/image.lua index 076cf5f9..27a50d45 100644 --- a/dots/.config/nvim/lua/plugins/configs/image.lua +++ b/dots/.config/nvim/lua/plugins/configs/image.lua @@ -5,10 +5,16 @@ return { ---@type vim.SystemCompleted local out = vim.system({ "luarocks", "--lua-version", "5.1", "--local", "install", "magick" }):wait() if out.code ~= 0 then + -- Delete it to ensure this builder script is ran again on next update/sync/etc. + vim.fn.delete(vim.fn.stdpath("data") .. "/lazy/image.nvim", "rf") error( - string.format( - "Failed to install `magick` luarock for image.nvim!\n---STDOUT---\n%s\n\n---STDERR---\n\n%s", out.stdout, - out.stderr), vim.log.levels.ERROR) + string.format( + "Failed to install `magick` luarock for image.nvim!\n---STDOUT---\n%s\n\n---STDERR---\n\n%s", + out.stdout, + out.stderr + ), + vim.log.levels.ERROR + ) end end, ft = { "markdown", "norg" },