Skip to content

Commit

Permalink
fix(operations): only find dependencies of rocks that exist (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed Nov 22, 2023
1 parent c38295a commit 6d3810d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lua/rocks/operations.lua
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,12 @@ operations.sync = function(user_rocks)
expand_ui = false
end

-- NOTE(vhyrro): It is not possible to use the vim.tbl_extend or vim.tbl_deep_extend
-- functions here within the async context. It simply refuses to work.
for k, v in pairs(state.rock_dependencies(user_rocks[key] or installed_rocks[key])) do
dependencies[k] = v
if installed_rocks[key] then
-- NOTE(vhyrro): It is not possible to use the vim.tbl_extend or vim.tbl_deep_extend
-- functions here within the async context. It simply refuses to work.
for k, v in pairs(state.rock_dependencies(installed_rocks[key])) do
dependencies[k] = v
end
end

if expand_ui and line_nr >= 1 then
Expand Down

0 comments on commit 6d3810d

Please sign in to comment.