Commit f394693
fix: make shellenv OS-specific and fix Windows binary path
Two critical fixes for e2e test failures:
1. **Make shellenv output OS-specific** (main.go:628-676)
- Windows: Output only PowerShell code
- Unix (macOS/Linux): Output only bash/zsh code
- Previous approach mixed PowerShell and bash syntax causing parse errors
- PowerShell syntax `if ($PSVersionTable)` broke bash/zsh sourcing
- Error: "Auto-cd failed" because wt function wasn't defined
2. **Fix Windows binary path** (e2e_test.go:245-249)
- Add .exe extension to binary name on Windows
- Detect Windows via filepath.Separator == '\\\\'
- Previous code built "wt.exe" but returned "wt" path
- Error: "Cannot bind argument to parameter 'Command' because it is null"
- PowerShell couldn't find/execute the binary
Root causes:
- macOS tests failed because shellenv output contained unparseable PowerShell syntax
- Windows tests failed because binary path was missing .exe extension
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 4ee220a commit f394693
2 files changed
+47
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
246 | 252 | | |
247 | 253 | | |
248 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
626 | 627 | | |
627 | 628 | | |
628 | 629 | | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
640 | 643 | | |
641 | | - | |
642 | 644 | | |
| 645 | + | |
| 646 | + | |
643 | 647 | | |
644 | | - | |
645 | | - | |
646 | | - | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
647 | 651 | | |
648 | | - | |
| 652 | + | |
649 | 653 | | |
650 | | - | |
651 | | - | |
| 654 | + | |
| 655 | + | |
652 | 656 | | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
657 | 668 | | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
| 669 | + | |
| 670 | + | |
668 | 671 | | |
669 | 672 | | |
670 | 673 | | |
671 | | - | |
672 | 674 | | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
673 | 678 | | |
674 | | - | |
| 679 | + | |
| 680 | + | |
675 | 681 | | |
676 | 682 | | |
677 | 683 | | |
| |||
0 commit comments