Skip to content

Commit 95379be

Browse files
folkenitdn
authored andcommitted
fix(lazy): added error handling for bootstrap (nvim-lua#1001)
1 parent 813fde3 commit 95379be

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
@@ -213,7 +213,10 @@ vim.api.nvim_create_autocmd('TextYankPost', {
213213
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
214214
if not vim.loop.fs_stat(lazypath) then
215215
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
216-
vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
216+
local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
217+
if vim.v.shell_error ~= 0 then
218+
error('Error cloning lazy.nvim:\n' .. out)
219+
end
217220
end ---@diagnostic disable-next-line: undefined-field
218221
vim.opt.rtp:prepend(lazypath)
219222

0 commit comments

Comments
 (0)