fix(heath): vim.uv. Fixes #1412

This commit is contained in:
Folke Lemaitre 2024-04-22 10:33:32 +02:00
parent 31ddbea7c1
commit 481aed70cc
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
local uv = vim.uv or vim.loop
local M = {} local M = {}
@ -26,7 +27,7 @@ function M.check()
local existing = false local existing = false
for _, site in pairs(sites) do for _, site in pairs(sites) do
for _, packs in ipairs(vim.fn.expand(site .. "/pack/*", false, true)) 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 existing = true
warn("found existing packages at `" .. packs .. "`") warn("found existing packages at `" .. packs .. "`")
end end
@ -46,7 +47,7 @@ function M.check()
end end
local packer_compiled = vim.fn.stdpath("config") .. "/plugin/packer_compiled.lua" 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 .. "`") error("please remove the file `" .. packer_compiled .. "`")
else else
ok("packer_compiled.lua not found") ok("packer_compiled.lua not found")