feat(install): print more information when there's a failure

This commit is contained in:
Pau Ruiz Safont
2020-09-15 15:23:14 +01:00
committed by Stephan Seitz
parent 013b0d1221
commit 2efeb80a44

View File

@@ -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