From 9203022fc9ceb86bd5df11ef33cce89399eaa25b Mon Sep 17 00:00:00 2001 From: Jose Pedro Oliveira Date: Sat, 20 Jul 2024 00:58:55 +0200 Subject: [PATCH] fix: add error handling to lazy's bootstrap (#3) --- kickstart-python.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kickstart-python.lua b/kickstart-python.lua index ea9b86c..052ac08 100644 --- a/kickstart-python.lua +++ b/kickstart-python.lua @@ -1,8 +1,11 @@ -- BOOTSTRAP the plugin manager `lazy.nvim` local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.uv.fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim" - vim.system({ "git", "clone", "--filter=blob:none", lazyrepo, "--branch=stable", lazypath }):wait() + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + error("Error cloning lazy.nvim:\n" .. out) + end end vim.opt.runtimepath:prepend(lazypath)