Commit a25dd58
authored
fix: resolve command to full exec path for Windows
resolves #270
On Windows, `uv.spawn()` does not automatically apply `PATHEXT`
resolution. This means when the plugin tries to spawn provider commands
like `claude-agent-acp`, it fails on Windows because the actual
exectuable is `claude-agent-acp.CMD` but `uv.spawn()` does not know to
look for the `.CMD` extension.
## Issue
The raw command name from config is being passed directly.
## Solution
`vim.fn.exepath()` function provides a cross-platform command resolver,
which includes the extension on Windows.
## Risk
Low, `vim.fn.exepath()` is available in all supported Neovim versions
(`0.11+`). Full paths are accepted by `uv.spawn()`.PATHEXT (#272)1 parent a37f19f commit a25dd58
1 file changed
Lines changed: 22 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
80 | 89 | | |
81 | 90 | | |
82 | 91 | | |
| |||
116 | 125 | | |
117 | 126 | | |
118 | 127 | | |
119 | | - | |
| 128 | + | |
120 | 129 | | |
121 | 130 | | |
122 | 131 | | |
| |||
183 | 192 | | |
184 | 193 | | |
185 | 194 | | |
186 | | - | |
187 | | - | |
188 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
189 | 200 | | |
190 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
191 | 207 | | |
192 | 208 | | |
| 209 | + | |
| 210 | + | |
193 | 211 | | |
194 | 212 | | |
195 | 213 | | |
| |||
0 commit comments