From 2efeb80a44796903687bc1959f54b64b76ffb485 Mon Sep 17 00:00:00 2001 From: Pau Ruiz Safont Date: Tue, 15 Sep 2020 15:23:14 +0100 Subject: feat(install): print more information when there's a failure --- lua/nvim-treesitter/install.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lua') diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index 0cc9806e6..b2d2e4193 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -49,9 +49,10 @@ local function iter_cmd_sync(cmd_list) print(cmd.info) end - vim.fn.system(get_command(cmd)) + local ret = vim.fn.system(get_command(cmd)) if vim.v.shell_error ~= 0 then - api.nvim_err_writeln(cmd.err or ("Failed to execute the following command:\n"..vim.inspect(cmd))) + print(ret) + api.nvim_err_writeln((cmd.err..'\n' or '').."Failed to execute the following command:\n"..vim.inspect(cmd)) return false end -- cgit v1.2.3-70-g09d2