diff options
| author | William Boman <william@redwill.se> | 2022-04-06 11:35:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-06 11:35:35 +0200 |
| commit | 0795a757e8b78116f7e6d9e353bcb0443c7dbc52 (patch) | |
| tree | 76f8d5d5eb55bb438db0de84a741b2d6b81fe073 /lua/nvim-lsp-installer/core/installer/context.lua | |
| parent | fix(pip3): always use normalized "python" executable with venv-enhanced path ... (diff) | |
| download | mason-0795a757e8b78116f7e6d9e353bcb0443c7dbc52.tar mason-0795a757e8b78116f7e6d9e353bcb0443c7dbc52.tar.gz mason-0795a757e8b78116f7e6d9e353bcb0443c7dbc52.tar.bz2 mason-0795a757e8b78116f7e6d9e353bcb0443c7dbc52.tar.lz mason-0795a757e8b78116f7e6d9e353bcb0443c7dbc52.tar.xz mason-0795a757e8b78116f7e6d9e353bcb0443c7dbc52.tar.zst mason-0795a757e8b78116f7e6d9e353bcb0443c7dbc52.zip | |
fix(r_language_server): run install script via stdin (#578)
Fixes #568.
Diffstat (limited to 'lua/nvim-lsp-installer/core/installer/context.lua')
| -rw-r--r-- | lua/nvim-lsp-installer/core/installer/context.lua | 7 |
1 files changed, 7 insertions, 0 deletions
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 @@ -43,6 +43,13 @@ function ContextualFs:append_file(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) return fs.file_exists(path.concat { self.cwd:get(), rel_path }) |
