summaryrefslogtreecommitdiff
path: root/lua/nvim-treesitter
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2020-09-19 15:14:11 +0200
committerSantos Gallegos <stsewd@protonmail.com>2020-09-19 10:45:52 -0500
commit8c4bc2803caebad1177ddedbf58d16ba03110257 (patch)
tree4714f9006127962a6ed929d5e6435260f09fc5c4 /lua/nvim-treesitter
parent624a6896b5ec7394ce61ccdd9e4b360b7fc4772e (diff)
fix: only concatenate cmd.err if not nil
Diffstat (limited to 'lua/nvim-treesitter')
-rw-r--r--lua/nvim-treesitter/install.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua
index b2d2e419..d0ee118a 100644
--- a/lua/nvim-treesitter/install.lua
+++ b/lua/nvim-treesitter/install.lua
@@ -52,7 +52,9 @@ local function iter_cmd_sync(cmd_list)
local ret = vim.fn.system(get_command(cmd))
if vim.v.shell_error ~= 0 then
print(ret)
- api.nvim_err_writeln((cmd.err..'\n' or '').."Failed to execute the following command:\n"..vim.inspect(cmd))
+ api.nvim_err_writeln((cmd.err and cmd.err..'\n' or '')
+ .."Failed to execute the following command:\n"
+ ..vim.inspect(cmd))
return false
end