Commit c0e96bd
fix: resolve spawn EINVAL on Windows — filter undefined env values and skip .cmd wrappers
Two root causes of spawn EINVAL on Windows:
1. process.env spread can include undefined values. Windows
child_process.spawn requires all env values to be strings.
sanitizeEnv now builds a clean object, dropping non-string entries.
2. Claude CLI installed via npm creates .cmd wrappers that cannot be
spawned without shell:true. Detect .cmd/.bat extensions and fall
back to SDK's internal resolution instead.
Bump version to 0.10.7.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 83a0109 commit c0e96bd
3 files changed
+19
-8
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | | - | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | | - | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
291 | 294 | | |
292 | 295 | | |
293 | 296 | | |
294 | | - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
295 | 301 | | |
296 | 302 | | |
297 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
298 | 309 | | |
299 | 310 | | |
300 | 311 | | |
| |||
0 commit comments