mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 23:06:14 +00:00
fix(vim.system): unclear non-executable message #33455
Problem:
When a command is not found or not executable, the error message gives
no indication about what command was actually tried.
Solution:
Always append the command name to the error message.
BEFORE:
E5108: Error executing lua …/_system.lua:248: ENOENT: no such file or directory
AFTER:
E5108: Error executing lua …/_system.lua:249: ENOENT: no such file or directory: "foo"
fix #33445
(cherry picked from commit 223ac7782e
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
dcd5e4574a
commit
4422b9bbd0
@@ -245,7 +245,7 @@ local function spawn(cmd, opts, on_exit, on_error)
|
||||
local handle, pid_or_err = uv.spawn(cmd, opts, on_exit)
|
||||
if not handle then
|
||||
on_error()
|
||||
error(pid_or_err)
|
||||
error(('%s: "%s"'):format(pid_or_err, cmd))
|
||||
end
|
||||
return handle, pid_or_err --[[@as integer]]
|
||||
end
|
||||
|
Reference in New Issue
Block a user