Commit 5511966
committed
fix(spawn): preserve Windows process.env Proxy behavior
When no custom environment variables are provided, use process.env
directly instead of spreading it. This preserves Windows Proxy behavior
which provides case-insensitive environment variable access.
Root cause: Spreading process.env creates a plain object that loses
the Proxy, breaking case-insensitive access on Windows (PATH vs Path).
Solution: Only spread when merging custom environment variables.
Otherwise, pass process.env directly to child process.
Benefits:
- Preserves Windows case-insensitive env var access
- Reduces unnecessary object creation when no custom env needed
- Fixes empty CLI output issue on Windows CI runners1 parent 0c655b9 commit 5511966
1 file changed
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
617 | 629 | | |
618 | 630 | | |
619 | 631 | | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
| 632 | + | |
625 | 633 | | |
626 | 634 | | |
627 | 635 | | |
| |||
0 commit comments