Commit 18e829a
fix(test): mock os.platform in ps-based shell detection tests
The 'should use detected shell when ps returns a known shell' and
'should fall back when ps command fails' tests assumed Unix platform.
On Windows CI, getDefaultShell() takes the win32 branch (wmic) instead
of the ps branch, causing the ps mock to be ignored.
Fix: mock os.platform() to return 'linux' so the Unix code path is
always exercised regardless of the CI runner's actual platform.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 430f4bb commit 18e829a
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
| 428 | + | |
428 | 429 | | |
| 430 | + | |
429 | 431 | | |
| 432 | + | |
430 | 433 | | |
431 | 434 | | |
432 | 435 | | |
| |||
438 | 441 | | |
439 | 442 | | |
440 | 443 | | |
| 444 | + | |
441 | 445 | | |
442 | 446 | | |
443 | 447 | | |
444 | 448 | | |
445 | 449 | | |
| 450 | + | |
446 | 451 | | |
| 452 | + | |
447 | 453 | | |
| 454 | + | |
448 | 455 | | |
449 | 456 | | |
450 | 457 | | |
| |||
456 | 463 | | |
457 | 464 | | |
458 | 465 | | |
| 466 | + | |
459 | 467 | | |
460 | 468 | | |
461 | 469 | | |
| |||
0 commit comments