diff options
| author | William Boman <william@redwill.se> | 2021-12-05 18:57:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-05 18:57:02 +0100 |
| commit | c82abb3117d83a36b58f07d341fd56a00bdfd360 (patch) | |
| tree | c6efa60621a8ab8eb9d128e4a6c75f89aea82a62 /lua/nvim-lsp-installer/server.lua | |
| parent | sumneko_lua: don't provide -E argument as it's not needed (#309) (diff) | |
| download | mason-c82abb3117d83a36b58f07d341fd56a00bdfd360.tar mason-c82abb3117d83a36b58f07d341fd56a00bdfd360.tar.gz mason-c82abb3117d83a36b58f07d341fd56a00bdfd360.tar.bz2 mason-c82abb3117d83a36b58f07d341fd56a00bdfd360.tar.lz mason-c82abb3117d83a36b58f07d341fd56a00bdfd360.tar.xz mason-c82abb3117d83a36b58f07d341fd56a00bdfd360.tar.zst mason-c82abb3117d83a36b58f07d341fd56a00bdfd360.zip | |
add ccls (#299)
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), |
