From 71863ffcef6cbba2559baef75a6d679e17b88cee Mon Sep 17 00:00:00 2001 From: Drake Bott Date: Fri, 7 Jun 2024 14:56:30 -0500 Subject: [PATCH] fix: use nio.create to remove rock synchronously within pcall --- lua/rocks-dev/local-rock-handler.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/rocks-dev/local-rock-handler.lua b/lua/rocks-dev/local-rock-handler.lua index 9395c1b..b3b337a 100644 --- a/lua/rocks-dev/local-rock-handler.lua +++ b/lua/rocks-dev/local-rock-handler.lua @@ -21,7 +21,7 @@ function rock_handler.get_sync_callback(rock) return nio.create(function(report_progress, report_error) api.query_installed_rocks(function(rocks) if rocks[rock.name] then - local ok = pcall(operations.remove(rock.name).wait) + local ok = pcall(nio.create(operations.remove(rock.name).wait)) if not ok then report_error(("rocks-dev: Failed to remove %s"):format(rock.name))