diff --git a/lua/rocks/luarocks.lua b/lua/rocks/luarocks.lua index 0dac24ac..83811f9d 100644 --- a/lua/rocks/luarocks.lua +++ b/lua/rocks/luarocks.lua @@ -55,6 +55,8 @@ luarocks.cli = function(args, on_exit, opts) opts = opts or {} ---@cast opts LuarocksCliOpts opts.synchronized = opts.synchronized ~= nil and opts.synchronized or false + -- Make sure no operations are aborted on nvim exit + opts.detach = true local on_exit_wrapped = vim.schedule_wrap(function(sc) if opts.synchronized then pcall(lock.set, true) @@ -78,6 +80,7 @@ luarocks.cli = function(args, on_exit, opts) }) local luarocks_cmd = { config.luarocks_binary, + "--force-lock", "--lua-version=" .. constants.LUA_VERSION, "--tree=" .. config.rocks_path, }