Skip to content

Commit

Permalink
fix(heath): vim.uv. Fixes #1412
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Apr 22, 2024
1 parent 31ddbea commit 481aed7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/lazy/health.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local Config = require("lazy.core.config")
local uv = vim.uv or vim.loop

local M = {}

Expand Down Expand Up @@ -26,7 +27,7 @@ function M.check()
local existing = false
for _, site in pairs(sites) do
for _, packs in ipairs(vim.fn.expand(site .. "/pack/*", false, true)) do
if not packs:find("[/\\]dist$") and vim.uv.fs_stat(packs) then
if not packs:find("[/\\]dist$") and uv.fs_stat(packs) then
existing = true
warn("found existing packages at `" .. packs .. "`")
end
Expand All @@ -46,7 +47,7 @@ function M.check()
end

local packer_compiled = vim.fn.stdpath("config") .. "/plugin/packer_compiled.lua"
if vim.uv.fs_stat(packer_compiled) then
if uv.fs_stat(packer_compiled) then
error("please remove the file `" .. packer_compiled .. "`")
else
ok("packer_compiled.lua not found")
Expand Down

0 comments on commit 481aed7

Please sign in to comment.