Commit 14bb554
committed
fix(tests): avoid spreading process.env in spawn calls
Spreading process.env creates a plain object that loses Node.js's
special Proxy behavior for environment variables on Windows. This
breaks case-insensitive env var access (PATH vs Path vs path) and
causes spawned CLI processes to have broken environment variables,
resulting in empty output.
Fix by conditionally building env object: use direct reference when
no spawnEnv is provided, only spread when merging custom env vars.1 parent bc941d2 commit 14bb554
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
269 | 273 | | |
270 | 274 | | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| |||
0 commit comments