Skip to content

Commit

Permalink
chore(operations): detach luarocks process (#308)
Browse files Browse the repository at this point in the history
Related to #307.
This doesn't seem to actually fix the issue.
Maybe due a libuv or neovim bug, in which the process isn't
actually detached?
I think this is what we want in case it does one day get fixed.
  • Loading branch information
mrcjkb authored Apr 29, 2024
1 parent 55c73a1 commit b8bed1e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/rocks/luarocks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ end
---@see vim.system
luarocks.cli = function(args, on_exit, opts)
opts = opts or {}
---@cast opts LuarocksCliOpts
opts.synchronized = opts.synchronized ~= nil and opts.synchronized or false
local on_exit_wrapped = vim.schedule_wrap(function(sc)
if opts.synchronized then
Expand Down Expand Up @@ -83,6 +84,7 @@ luarocks.cli = function(args, on_exit, opts)
luarocks_cmd = vim.list_extend(luarocks_cmd, mk_server_args(opts.servers))
luarocks_cmd = vim.list_extend(luarocks_cmd, args)
log.info(luarocks_cmd)
opts.detach = true -- Prevent luarocks from exiting uncleanly
return vim.system(luarocks_cmd, opts, on_exit_wrapped)
end

Expand Down

0 comments on commit b8bed1e

Please sign in to comment.