diff options
Diffstat (limited to 'lua/nvim-lsp-installer/server.lua')
| -rw-r--r-- | lua/nvim-lsp-installer/server.lua | 7 |
1 files changed, 7 insertions, 0 deletions
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), |
