Skip to content

Commit 3bbd314

Browse files
folkerodolfolabiapari
authored andcommitted
fix(lazy): added error handling for bootstrap (nvim-lua#1001)
1 parent 682baab commit 3bbd314

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

init.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,10 @@ vim.api.nvim_create_autocmd('TextYankPost', {
220220
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
221221
if not vim.loop.fs_stat(lazypath) then
222222
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
223-
vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
223+
local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
224+
if vim.v.shell_error ~= 0 then
225+
error('Error cloning lazy.nvim:\n' .. out)
226+
end
224227
end ---@diagnostic disable-next-line: undefined-field
225228
vim.opt.rtp:prepend(lazypath)
226229

0 commit comments

Comments
 (0)