Skip to content

Commit

Permalink
fix(plugin): check that import is a string. See #825
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 25, 2023
1 parent 721e37b commit c325c50
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/lazy/core/plugin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ function Spec:import(spec)
if spec.import == "lazy" then
return self:error("You can't name your plugins module `lazy`.")
end
if type(spec.import) ~= "string" then
return self:error("Invalid import spec. `import` should be a string: " .. vim.inspect(spec))
end
if vim.tbl_contains(self.modules, spec.import) then
return
end
Expand Down

0 comments on commit c325c50

Please sign in to comment.