From 481aed70cc4d8e8a38463fd16edf81a23c153247 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 22 Apr 2024 10:33:32 +0200 Subject: [PATCH] fix(heath): vim.uv. Fixes #1412 --- lua/lazy/health.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/lazy/health.lua b/lua/lazy/health.lua index bcc546a..7b06f1d 100644 --- a/lua/lazy/health.lua +++ b/lua/lazy/health.lua @@ -1,4 +1,5 @@ local Config = require("lazy.core.config") +local uv = vim.uv or vim.loop local M = {} @@ -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 @@ -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")