feat: inline terminal respects VSCode shell configuration #10563
+22
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related GitHub Issue
Closes: #10329
Description
This PR attempts to address the question from Issue #10329 about configuring the inline terminal to use PowerShell instead of cmd.exe on Windows.
The Problem:
The inline terminal (ExecaTerminalProcess) was using
shell: truewhen calling execa, which defaults to the system shell (cmd.exe on Windows), ignoring the user's VSCode terminal profile settings.The Solution:
Modified
ExecaTerminalProcess.tsto use the existinggetShell()utility function instead ofshell: true. ThegetShell()function already reads the user's VSCode terminal configuration (terminal.integrated.defaultProfile.windows) and returns the appropriate shell path.This means if a user has configured PowerShell as their default terminal profile in VSCode, the inline terminal will now respect that setting.
Test Procedure
cd src && npx vitest run integrations/terminal/__tests__/ExecaTerminalProcess.spec.tsterminal.integrated.defaultProfile.windowsto a PowerShell profile in VSCode settingsPre-Submission Checklist
Documentation Updates
Additional Notes
Feedback and guidance are welcome. This is an attempt to address the user's question about PowerShell support for the inline terminal.
Important
ExecaTerminalProcessnow respects VSCode's shell configuration usinggetShell(), with updated tests to verify behavior.ExecaTerminalProcessnow usesgetShell()instead ofshell: trueto respect VSCode'sterminal.integrated.defaultProfile.windowssetting.LANGandLC_ALLtoen_US.UTF-8.ExecaTerminalProcess.spec.tsto mockgetShell()and verify the correct shell is used.This description was created by
for 36b98bd. You can customize this summary. It will automatically update as commits are pushed.