Skip to content

Commit 146de4e

Browse files
committed
fix(rocks): dont trigger rebuild for luarocks when build is overriden
1 parent c33b9fb commit 146de4e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lua/lazy/core/plugin.lua

+10-10
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@ function Spec:import(spec)
170170
self.importing = nil
171171
return self:error(
172172
"Invalid spec module: `"
173-
.. modname
174-
.. "`\nExpected a `table` of specs, but a `"
175-
.. type(mod)
176-
.. "` was returned instead"
173+
.. modname
174+
.. "`\nExpected a `table` of specs, but a `"
175+
.. type(mod)
176+
.. "` was returned instead"
177177
)
178178
end
179179
self:normalize(mod)
@@ -216,11 +216,11 @@ function M.update_state()
216216
plugin._ = plugin._ or {}
217217
if plugin.lazy == nil then
218218
local lazy = plugin._.dep
219-
or Config.options.defaults.lazy
220-
or plugin.event
221-
or plugin.keys
222-
or plugin.ft
223-
or plugin.cmd
219+
or Config.options.defaults.lazy
220+
or plugin.event
221+
or plugin.keys
222+
or plugin.ft
223+
or plugin.cmd
224224
plugin.lazy = lazy and true or false
225225
end
226226
if plugin.dir:find(Config.options.root, 1, true) == 1 then
@@ -264,7 +264,7 @@ function M.update_rocks_state()
264264
end)
265265

266266
for _, plugin in pairs(Config.plugins) do
267-
if plugin._.pkg and plugin._.pkg.source == "rockspec" then
267+
if plugin._.pkg and plugin._.pkg.source == "rockspec" and plugin.build == "rockspec" then
268268
plugin._.build = not installed[plugin.name]
269269
end
270270
end

0 commit comments

Comments
 (0)