diff options
| author | Pau Ruiz Safont <unduthegun@gmail.com> | 2020-09-15 15:23:14 +0100 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2020-09-19 13:35:12 +0200 |
| commit | 2efeb80a44796903687bc1959f54b64b76ffb485 (patch) | |
| tree | 56853b64af8852c5eb9a8f760a7ffab22d81886a /lua | |
| parent | [docgen] Update README.md (diff) | |
| download | nvim-treesitter-2efeb80a44796903687bc1959f54b64b76ffb485.tar nvim-treesitter-2efeb80a44796903687bc1959f54b64b76ffb485.tar.gz nvim-treesitter-2efeb80a44796903687bc1959f54b64b76ffb485.tar.bz2 nvim-treesitter-2efeb80a44796903687bc1959f54b64b76ffb485.tar.lz nvim-treesitter-2efeb80a44796903687bc1959f54b64b76ffb485.tar.xz nvim-treesitter-2efeb80a44796903687bc1959f54b64b76ffb485.tar.zst nvim-treesitter-2efeb80a44796903687bc1959f54b64b76ffb485.zip | |
feat(install): print more information when there's a failure
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/install.lua | 5 |
1 files changed, 3 insertions, 2 deletions
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 |
