mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-07-19 19:55:12 +00:00
Merge 17732094c8
into 6c3bda4aca
This commit is contained in:
commit
465764ad07
2 changed files with 4 additions and 4 deletions
|
@ -43,7 +43,7 @@ function M.have(cmd, opts)
|
|||
else
|
||||
local version = vim.trim(out[1] or "")
|
||||
version = version:gsub("^%s*" .. vim.pesc(c) .. "%s*", "")
|
||||
if opts.version_pattern and not version:find(opts.version_pattern, 1, true) then
|
||||
if opts.version_pattern and not version:find(opts.version_pattern) then
|
||||
opts.warn(("`%s` version `%s` needed, but found `%s`"):format(c, opts.version_pattern, version))
|
||||
else
|
||||
found = ("{%s} `%s`"):format(c, version)
|
||||
|
@ -59,7 +59,7 @@ function M.have(cmd, opts)
|
|||
(opts.optional and opts.warn or opts.error)(
|
||||
("{%s} %snot installed"):format(
|
||||
table.concat(cmd, "} or {"),
|
||||
opts.version_pattern and "version `" .. opts.version_pattern .. "` " or ""
|
||||
opts.version_pattern and "version matching `" .. opts.version_pattern .. "` " or ""
|
||||
)
|
||||
)
|
||||
end
|
||||
|
|
|
@ -82,7 +82,7 @@ function M.check(opts)
|
|||
M.hererocks.bin("lua"),
|
||||
vim.tbl_extend("force", opts, {
|
||||
version = "-v",
|
||||
version_pattern = "5.1",
|
||||
version_pattern = "5%.[1-9]",
|
||||
})
|
||||
)
|
||||
end
|
||||
|
@ -92,7 +92,7 @@ function M.check(opts)
|
|||
{ "lua5.1", "lua", "lua-5.1" },
|
||||
vim.tbl_extend("force", opts, {
|
||||
version = "-v",
|
||||
version_pattern = "5.1",
|
||||
version_pattern = "5%.[1-9]",
|
||||
})
|
||||
)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue