fix(lsp): fix validation for MasonPackage
This commit is contained in:
+6
-8
@@ -33,21 +33,19 @@ function M.validate(config)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
if utils.is_list(f, "string") then
|
|
||||||
return true
|
|
||||||
elseif not utils.is_list(f) then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
for _, dep in ipairs(f) do
|
for _, dep in ipairs(f) do
|
||||||
if not M.validate(dep) then
|
local t = type(dep)
|
||||||
|
if
|
||||||
|
(t ~= "string" and t ~= "table")
|
||||||
|
or (type(dep) == "table" and not M.validate(dep))
|
||||||
|
then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
"list of dependencies",
|
"list of string|MasonPackageConfig",
|
||||||
},
|
},
|
||||||
post_install = {
|
post_install = {
|
||||||
config.post_install,
|
config.post_install,
|
||||||
|
|||||||
Reference in New Issue
Block a user