aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/log.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-05-29 23:02:29 +0200
committerWilliam Boman <william@redwill.se>2022-05-29 23:02:29 +0200
commitd2185d4c8e9a2efed3772ced6fec9a0de60b5327 (patch)
tree6b8625f59df483e7040e09394ed2b3b9e4e777b3 /lua/nvim-lsp-installer/log.lua
parentchore: use stdpath("state") for logs (diff)
downloadmason-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.lua5
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