Commit be5fc27
committed
fix(tests): use Proxy in test mode to preserve Windows env behavior
In test mode (VITEST=1), use a Proxy that dynamically reads from
process.env instead of spreading into a plain object. This preserves
Windows process.env Proxy behavior through the entire spawn chain.
In production, continue using a static snapshot for performance.
Key benefits:
- Proxy preserves case-insensitive env var access on Windows
- Dynamic lookups ensure current env values are always used
- No performance impact in production (still uses static snapshot)
- Fixes empty CLI output issue on Windows CI runners1 parent ec3a565 commit be5fc27
1 file changed
+42
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
269 | 310 | | |
270 | 311 | | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
| 312 | + | |
276 | 313 | | |
277 | 314 | | |
278 | 315 | | |
| |||
0 commit comments