From 0795a757e8b78116f7e6d9e353bcb0443c7dbc52 Mon Sep 17 00:00:00 2001 From: William Boman Date: Wed, 6 Apr 2022 11:35:35 +0200 Subject: fix(r_language_server): run install script via stdin (#578) Fixes #568. --- lua/nvim-lsp-installer/core/installer/context.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lua/nvim-lsp-installer/core/installer/context.lua') diff --git a/lua/nvim-lsp-installer/core/installer/context.lua b/lua/nvim-lsp-installer/core/installer/context.lua index ad956178..0b13859b 100644 --- a/lua/nvim-lsp-installer/core/installer/context.lua +++ b/lua/nvim-lsp-installer/core/installer/context.lua @@ -42,6 +42,13 @@ function ContextualFs:append_file(rel_path, contents) return fs.append_file(path.concat { self.cwd:get(), rel_path }, contents) end +---@async +---@param rel_path string @The relative path from the current working directory to the file to write. +---@param contents string +function ContextualFs:write_file(rel_path, contents) + return fs.write_file(path.concat { self.cwd:get(), rel_path }, contents) +end + ---@async ---@param rel_path string @The relative path from the current working directory. function ContextualFs:file_exists(rel_path) -- cgit v1.3.1