From c82abb3117d83a36b58f07d341fd56a00bdfd360 Mon Sep 17 00:00:00 2001 From: William Boman Date: Sun, 5 Dec 2021 18:57:02 +0100 Subject: add ccls (#299) --- lua/nvim-lsp-installer/server.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lua/nvim-lsp-installer/server.lua') diff --git a/lua/nvim-lsp-installer/server.lua b/lua/nvim-lsp-installer/server.lua index 56ae77b5..b736e2cf 100644 --- a/lua/nvim-lsp-installer/server.lua +++ b/lua/nvim-lsp-installer/server.lua @@ -187,10 +187,16 @@ function M.Server:install_attached(context, callback) ("Failed to promote the temporary installation directory %q.\n"):format(context.install_dir) ) pcall(fs.rmrf, self:get_tmp_install_dir()) + pcall(fs.rmrf, context.install_dir) callback(false) return end + -- The tmp dir should in most cases have been "promoted" and already renamed to its final destination, + -- but we make sure to delete it should the installer modify the installation working directory during + -- installation. + pcall(fs.rmrf, self:get_tmp_install_dir()) + -- Dispatch the server is ready vim.schedule(function() dispatcher.dispatch_server_ready(self) @@ -201,6 +207,7 @@ function M.Server:install_attached(context, callback) callback(true) else pcall(fs.rmrf, self:get_tmp_install_dir()) + pcall(fs.rmrf, context.install_dir) callback(false) end end), -- cgit v1.2.3-70-g09d2