From 74ad56ff68f9853a3cdb6004bf01162911bcadd6 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Mon, 31 Oct 2022 16:27:12 +0100 Subject: refactor(installer): skip unstable headless update (#3338) --- utils/ci/verify_plugins.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'utils/ci/verify_plugins.lua') diff --git a/utils/ci/verify_plugins.lua b/utils/ci/verify_plugins.lua index cecb01db..d009cbda 100644 --- a/utils/ci/verify_plugins.lua +++ b/utils/ci/verify_plugins.lua @@ -26,6 +26,20 @@ end local is_directory = require("lvim.utils").is_directory -- see packer.init() local packdir = join_paths(get_runtime_dir(), "site", "pack", "packer") + +local verify_packer = function() + if not is_directory(packdir) then + io.write "Packer not installed!" + os.exit(1) + end + local status_ok, packer = pcall(require, "packer") + if status_ok and packer then + return + end + io.write "Packer not installed!" + os.exit(1) +end + local packer_config = { opt_dir = join_paths(packdir, "opt"), start_dir = join_paths(packdir, "start") } local is_optional = function(spec) return spec.opt or spec.event or spec.cmd or spec.module @@ -130,5 +144,6 @@ local function verify_core_plugins(verbose) end) end +verify_packer() verify_core_plugins() vim.cmd "q" -- cgit v1.2.3