mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
fix(tests): indicate in test logs when nvim exit times out
When it happens it wastes 2 seconds which is NOT included in the normal busted timing info. It is hard to correct this, but we can at least print a warning when this happens.
This commit is contained in:
@@ -21,13 +21,15 @@ local function man_system(cmd, silent)
|
||||
local done = false
|
||||
local exit_code
|
||||
|
||||
local handle = vim.loop.spawn(cmd[1], {
|
||||
local handle
|
||||
handle = vim.loop.spawn(cmd[1], {
|
||||
args = vim.list_slice(cmd, 2),
|
||||
stdio = { nil, stdout, stderr },
|
||||
}, function(code)
|
||||
exit_code = code
|
||||
stdout:close()
|
||||
stderr:close()
|
||||
handle:close()
|
||||
done = true
|
||||
end)
|
||||
|
||||
@@ -52,7 +54,7 @@ local function man_system(cmd, silent)
|
||||
|
||||
if not done then
|
||||
if handle then
|
||||
vim.loop.shutdown(handle)
|
||||
handle:close()
|
||||
stdout:close()
|
||||
stderr:close()
|
||||
end
|
||||
|
Reference in New Issue
Block a user