Commit 206c6ee
Introducing new cmake.shell setting for custom shell executable for CMake subprocesses (#4762)
* Initial plan
* feat: Add cmake.shell setting for custom shell execution (#1750)
Add a `cmake.shell` setting (string|null, default null) that routes all
cmake/ctest/cpack subprocess invocations through a user-specified shell
(e.g., Git Bash, MSYS2). This enables embedded devs using GNU toolchains
with Unix Makefiles on Windows where POSIX path translation is required.
Root cause fix: `!!options.shell` in proc.ts coerced string shell paths
to boolean `true`, discarding the actual path. Changed to
`options.shell ?? false` to preserve string values that Node.js
child_process.spawn() natively supports.
Fixes #1750
Co-authored-by: hanniavalera <[email protected]>
* fix: resolve bad merge in config.ts and config.test.ts
Fix three merge conflicts between the shell and setBuildTargetSameAsLaunchTarget features:
1. config.ts: Add missing closing brace for shell getter
2. config.ts: Remove duplicate additionalBuildProblemMatchers emitter, add missing comma
3. config.test.ts: Remove duplicate additionalBuildProblemMatchers entry, add missing comma
Co-authored-by: hanniavalera <[email protected]>
* fix: determineShell precedence, wire shell onChange, audit call sites
1. cmakeDriver.ts executeCommand(): On Windows, determineShell's
command-type-specific detection (.cmd→cmd, .ps1→powershell) now takes
precedence over config.shell so .cmd/.bat commands aren't routed through
Git Bash.
2. cmakeProject.ts: Wire shell onChange emitter to trigger driver reload
when cmake.shell changes at runtime.
3. cmakeTaskProvider.ts: Apply same determineShell precedence logic for
direct proc.execute calls.
4. debuggerScriptDriver.ts: Propagate config.shell with determineShell
precedence for CMake script debugging.
5. shell-propagation.test.ts: Add 9 tests for determineShell detection
and precedence logic.
Co-authored-by: hanniavalera <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: hanniavalera <[email protected]>1 parent b69f08d commit 206c6ee
12 files changed
Lines changed: 214 additions & 10 deletions
File tree
- docs
- src
- debug/cmakeDebugger
- drivers
- test/unit-tests
- backend
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2394 | 2394 | | |
2395 | 2395 | | |
2396 | 2396 | | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
2397 | 2406 | | |
2398 | 2407 | | |
2399 | 2408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
847 | 847 | | |
848 | 848 | | |
849 | 849 | | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
850 | 855 | | |
851 | 856 | | |
852 | 857 | | |
| |||
890 | 895 | | |
891 | 896 | | |
892 | 897 | | |
893 | | - | |
| 898 | + | |
| 899 | + | |
894 | 900 | | |
895 | 901 | | |
896 | 902 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
590 | | - | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
591 | 594 | | |
592 | 595 | | |
593 | 596 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
| |||
628 | 629 | | |
629 | 630 | | |
630 | 631 | | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
631 | 636 | | |
632 | 637 | | |
633 | 638 | | |
| |||
703 | 708 | | |
704 | 709 | | |
705 | 710 | | |
706 | | - | |
707 | | - | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
708 | 714 | | |
709 | 715 | | |
710 | 716 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
522 | | - | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
523 | 528 | | |
524 | 529 | | |
525 | 530 | | |
| |||
554 | 559 | | |
555 | 560 | | |
556 | 561 | | |
557 | | - | |
| 562 | + | |
558 | 563 | | |
559 | 564 | | |
560 | 565 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
0 commit comments