Skip to content

Commit

Permalink
fix: use nio.create to remove rock synchronously within pcall
Browse files Browse the repository at this point in the history
  • Loading branch information
bottd committed Jun 7, 2024
1 parent cf0c9e5 commit 71863ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/rocks-dev/local-rock-handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 71863ff

Please sign in to comment.