mirror of https://github.com/folke/lazy.nvim.git
fix: duplicate state check in bootstrap (#255)
This commit is contained in:
parent
8d452e37bb
commit
51fb95e4a8
|
@ -39,10 +39,8 @@ You can add the following Lua code to your `init.lua` to bootstrap **lazy.nvim**
|
|||
```lua
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
|
||||
vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
```
|
||||
|
|
|
@ -67,12 +67,10 @@ end
|
|||
|
||||
function M.bootstrap()
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
|
||||
vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue