From c964ad560cb449f4be9e95817ed4fc4222a009fa Mon Sep 17 00:00:00 2001 From: Austin Liu Date: Tue, 9 Jul 2024 14:29:19 -0700 Subject: [PATCH] fix: external sync actions not running This bug was introduced by the refactor in commit 704940f43c600f95a5d4a5177b918af849b3a150, which changed external_actions from a list to a key-value table. However, when iterating through external_actions, we still use ipairs which results in no values. The fix is to use pairs, which properly iterates through all external_actions. --- lua/rocks/operations/sync.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/rocks/operations/sync.lua b/lua/rocks/operations/sync.lua index 95a0c695..60c3c0b9 100644 --- a/lua/rocks/operations/sync.lua +++ b/lua/rocks/operations/sync.lua @@ -132,7 +132,7 @@ operations.sync = function(user_rocks, on_complete) end -- Sync actions handled by external modules that have registered handlers - for _, callback in ipairs(sync_status.external_actions) do + for _, callback in pairs(sync_status.external_actions) do ct = ct + 1 callback(report_progress, report_error) end