File tree 1 file changed +14
-5
lines changed
1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 1
- local Util = require (" lazy.util" )
2
1
local Config = require (" lazy.core.config" )
3
2
4
3
local M = {}
5
4
6
5
function M .check ()
7
6
vim .health .report_start (" lazy.nvim" )
8
7
8
+ local sites = vim .opt .packpath :get ()
9
+ local default_site = vim .fn .stdpath (" data" ) .. " /site"
10
+ if not vim .tbl_contains (sites , default_site ) then
11
+ sites [# sites + 1 ] = default_site
12
+ end
13
+
9
14
local existing = false
10
- Util .ls (vim .fn .stdpath (" data" ) .. " /site/pack/" , function (path )
11
- existing = true
12
- vim .health .report_warn (" found existing packages at `" .. path .. " `" )
13
- end )
15
+ for _ , site in pairs (sites ) do
16
+ for _ , packs in ipairs (vim .fn .expand (site .. " /pack/*" , false , true )) do
17
+ if not packs :find (" /dist$" ) and vim .loop .fs_stat (packs ) then
18
+ existing = true
19
+ vim .health .report_warn (" found existing packages at `" .. packs .. " `" )
20
+ end
21
+ end
22
+ end
14
23
if not existing then
15
24
vim .health .report_ok (" no existing packages found by other package managers" )
16
25
end
You can’t perform that action at this time.
0 commit comments