aboutsummaryrefslogtreecommitdiff
path: root/lua/pml68/lazy.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/pml68/lazy.lua')
-rw-r--r--lua/pml68/lazy.lua13
1 files changed, 11 insertions, 2 deletions
diff --git a/lua/pml68/lazy.lua b/lua/pml68/lazy.lua
index bf0e87d..32500fa 100644
--- a/lua/pml68/lazy.lua
+++ b/lua/pml68/lazy.lua
@@ -1,6 +1,6 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
-if not vim.loop.fs_stat(lazypath) then
- vim.fn.system({
+if not (vim.uv or vim.loop).fs_stat(lazypath) then
+ local out = vim.fn.system({
"git",
"clone",
"--filter=blob:none",
@@ -8,6 +8,15 @@ if not vim.loop.fs_stat(lazypath) then
"--branch=stable", -- latest stable release
lazypath,
})
+ if vim.v.shell_error ~= 0 then
+ vim.api.nvim_echo({
+ { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
+ { out, "WarningMsg" },
+ { "\nPress any key to exit..." },
+ }, true, {})
+ vim.fn.getchar()
+ os.exit(1)
+ end
end
vim.opt.rtp:prepend(lazypath)