mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 13:15:09 -07:00
fix: windows timeouts have exit code 1
This commit is contained in:
parent
80d1333b73
commit
be8b15200d
@ -277,7 +277,9 @@ local function _on_exit(state, code, signal, on_exit)
|
|||||||
state.done = true
|
state.done = true
|
||||||
end
|
end
|
||||||
|
|
||||||
if code == 0 and state.done == 'timeout' then
|
if (code == 0 or code == 1) and state.done == 'timeout' then
|
||||||
|
-- Unix: code == 0
|
||||||
|
-- Windows: code == 1
|
||||||
code = 124
|
code = 124
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -326,10 +328,12 @@ function M.run(cmd, opts, on_exit)
|
|||||||
stderr = stderr,
|
stderr = stderr,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
--- @diagnostic disable-next-line:missing-fields
|
||||||
state.handle, state.pid = spawn(cmd[1], {
|
state.handle, state.pid = spawn(cmd[1], {
|
||||||
args = vim.list_slice(cmd, 2),
|
args = vim.list_slice(cmd, 2),
|
||||||
stdio = { stdin, stdout, stderr },
|
stdio = { stdin, stdout, stderr },
|
||||||
cwd = opts.cwd,
|
cwd = opts.cwd,
|
||||||
|
--- @diagnostic disable-next-line:assign-type-mismatch
|
||||||
env = setup_env(opts.env, opts.clear_env),
|
env = setup_env(opts.env, opts.clear_env),
|
||||||
detached = opts.detach,
|
detached = opts.detach,
|
||||||
hide = true,
|
hide = true,
|
||||||
|
Loading…
Reference in New Issue
Block a user