diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2025-04-16 05:06:39 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-16 05:06:39 -0700 |
| commit | 223ac7782e24c3d662185b5f1fc63d718c4376bc (patch) | |
| tree | 15e10cd269151e575f9f0f51c594dbbd175e1f04 /runtime/lua/vim/_system.lua | |
| parent | fd973c0a4ec0246708d0fcc46e66e38dd1f89a26 (diff) | |
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
Diffstat (limited to 'runtime/lua/vim/_system.lua')
| -rw-r--r-- | runtime/lua/vim/_system.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/_system.lua b/runtime/lua/vim/_system.lua index 157172447a..947aa5c86f 100644 --- a/runtime/lua/vim/_system.lua +++ b/runtime/lua/vim/_system.lua @@ -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 |
