From af20eda31aee69bd2f1bc69d108d1fccf54cb249 Mon Sep 17 00:00:00 2001 From: William Boman Date: Mon, 24 Jan 2022 19:38:44 +0100 Subject: fix(beancount): fix rename on windows, also remove debug print --- lua/nvim-lsp-installer/servers/beancount/init.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lua') diff --git a/lua/nvim-lsp-installer/servers/beancount/init.lua b/lua/nvim-lsp-installer/servers/beancount/init.lua index 9d536122..b9908488 100644 --- a/lua/nvim-lsp-installer/servers/beancount/init.lua +++ b/lua/nvim-lsp-installer/servers/beancount/init.lua @@ -10,7 +10,7 @@ local process = require "nvim-lsp-installer.process" local coalesce, when = Data.coalesce, Data.when return function(name, root_dir) - print(process.extend_path { root_dir, pip3.path(root_dir) }) + local file_ext = platform.is_win and ".exe" or "" return server.Server:new { name = name, root_dir = root_dir, @@ -28,7 +28,11 @@ return function(name, root_dir) context.capture(function(ctx) return installers.pipe { std.unzip_remote(ctx.github_release_file), - std.rename("beancount-language-server", "beancount-langserver"), -- to conform with lspconfig + -- We rename the binary to conform with lspconfig + std.rename( + ("beancount-language-server%s"):format(file_ext), + ("beancount-langserver%s"):format(file_ext) + ), } end), context.promote_install_dir(), -- cgit v1.2.3-70-g09d2