diff options
| author | William Boman <william@redwill.se> | 2022-05-29 23:02:29 +0200 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2022-05-29 23:02:29 +0200 |
| commit | d2185d4c8e9a2efed3772ced6fec9a0de60b5327 (patch) | |
| tree | 6b8625f59df483e7040e09394ed2b3b9e4e777b3 /lua/nvim-lsp-installer/log.lua | |
| parent | chore: use stdpath("state") for logs (diff) | |
| download | mason-d2185d4c8e9a2efed3772ced6fec9a0de60b5327.tar mason-d2185d4c8e9a2efed3772ced6fec9a0de60b5327.tar.gz mason-d2185d4c8e9a2efed3772ced6fec9a0de60b5327.tar.bz2 mason-d2185d4c8e9a2efed3772ced6fec9a0de60b5327.tar.lz mason-d2185d4c8e9a2efed3772ced6fec9a0de60b5327.tar.xz mason-d2185d4c8e9a2efed3772ced6fec9a0de60b5327.tar.zst mason-d2185d4c8e9a2efed3772ced6fec9a0de60b5327.zip | |
fix(log): check is has nvim-0.8.0 before accessing stdpath("state")
Diffstat (limited to 'lua/nvim-lsp-installer/log.lua')
| -rw-r--r-- | lua/nvim-lsp-installer/log.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lua/nvim-lsp-installer/log.lua b/lua/nvim-lsp-installer/log.lua index 33be9ed7..e616c630 100644 --- a/lua/nvim-lsp-installer/log.lua +++ b/lua/nvim-lsp-installer/log.lua @@ -31,7 +31,10 @@ local config = { } local log = { - outfile = path.concat { (vim.fn.stdpath "state" or vim.fn.stdpath "cache"), ("%s.log"):format(config.name) }, + outfile = path.concat { + ((vim.fn.has "nvim-0.8.0" and vim.fn.stdpath "state") or vim.fn.stdpath "cache"), + ("%s.log"):format(config.name), + }, } local unpack = unpack or table.unpack |
