From 8c4bc2803caebad1177ddedbf58d16ba03110257 Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Sat, 19 Sep 2020 15:14:11 +0200 Subject: fix: only concatenate cmd.err if not nil --- lua/nvim-treesitter/install.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index b2d2e4193..d0ee118a1 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 -- cgit v1.2.3-70-g09d2