Commit ca386d2
committed
fix(windows): prevent terminal flashing during WSL detection and execution
- Add CREATE_NO_WINDOW flag (0x08000000) to all WSL commands
- Create wsl_command() helper function that sets the flag automatically
- Apply flag to WSL detection in claude_binary.rs (distro listing, claude path finding)
- Apply flag to WSL detection in shell_environment.rs (distro detection, claude check)
- Apply flag to actual Claude execution via WSL in commands/claude.rs
- Apply flag to Git Bash execution as well
This prevents the console window from briefly appearing when:
1. Auto-detecting Claude installations in WSL distributions
2. Running Claude commands through WSL
3. Running Claude commands through Git Bash1 parent 31d446c commit ca386d2
File tree
3 files changed
+54
-11
lines changed- src-tauri/src
- commands
3 files changed
+54
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
11 | 18 | | |
12 | 19 | | |
13 | 20 | | |
| |||
552 | 559 | | |
553 | 560 | | |
554 | 561 | | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
555 | 570 | | |
556 | 571 | | |
557 | 572 | | |
558 | 573 | | |
559 | | - | |
| 574 | + | |
560 | 575 | | |
561 | 576 | | |
562 | 577 | | |
| |||
594 | 609 | | |
595 | 610 | | |
596 | 611 | | |
597 | | - | |
| 612 | + | |
598 | 613 | | |
599 | 614 | | |
600 | 615 | | |
| |||
615 | 630 | | |
616 | 631 | | |
617 | 632 | | |
618 | | - | |
| 633 | + | |
619 | 634 | | |
620 | 635 | | |
621 | 636 | | |
| |||
627 | 642 | | |
628 | 643 | | |
629 | 644 | | |
630 | | - | |
| 645 | + | |
631 | 646 | | |
632 | 647 | | |
633 | 648 | | |
| |||
643 | 658 | | |
644 | 659 | | |
645 | 660 | | |
646 | | - | |
| 661 | + | |
647 | 662 | | |
648 | 663 | | |
649 | 664 | | |
| |||
656 | 671 | | |
657 | 672 | | |
658 | 673 | | |
659 | | - | |
| 674 | + | |
660 | 675 | | |
661 | 676 | | |
662 | 677 | | |
| |||
673 | 688 | | |
674 | 689 | | |
675 | 690 | | |
676 | | - | |
| 691 | + | |
677 | 692 | | |
678 | 693 | | |
679 | 694 | | |
| |||
691 | 706 | | |
692 | 707 | | |
693 | 708 | | |
694 | | - | |
| 709 | + | |
695 | 710 | | |
696 | 711 | | |
697 | 712 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
16 | 24 | | |
17 | 25 | | |
18 | 26 | | |
| |||
398 | 406 | | |
399 | 407 | | |
400 | 408 | | |
| 409 | + | |
| 410 | + | |
401 | 411 | | |
402 | 412 | | |
403 | 413 | | |
| |||
434 | 444 | | |
435 | 445 | | |
436 | 446 | | |
| 447 | + | |
| 448 | + | |
437 | 449 | | |
438 | 450 | | |
439 | 451 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
16 | 31 | | |
17 | 32 | | |
18 | 33 | | |
| |||
101 | 116 | | |
102 | 117 | | |
103 | 118 | | |
104 | | - | |
| 119 | + | |
105 | 120 | | |
106 | 121 | | |
107 | 122 | | |
| |||
220 | 235 | | |
221 | 236 | | |
222 | 237 | | |
223 | | - | |
| 238 | + | |
224 | 239 | | |
225 | 240 | | |
226 | 241 | | |
| |||
282 | 297 | | |
283 | 298 | | |
284 | 299 | | |
| 300 | + | |
285 | 301 | | |
286 | 302 | | |
287 | 303 | | |
288 | 304 | | |
289 | 305 | | |
290 | 306 | | |
291 | 307 | | |
292 | | - | |
| 308 | + | |
293 | 309 | | |
294 | 310 | | |
295 | 311 | | |
| |||
0 commit comments