Fix automationProfile to handle args and env parameters#771
Draft
Fix automationProfile to handle args and env parameters#771
Conversation
When the terminal.integrated.automationProfile setting is an object with path, args, and env properties, only the path was being used. This fix: 1. Adds AutomationProfileSetting interface to properly type the setting 2. Extracts and uses args parameter when spawning child processes 3. Merges env from automationProfile with the spawn environment 4. Adds parseShellSetting helper function for testability 5. Adds unit tests for parseShellSetting function Fixes the issue where --login and other shell args were ignored when using msys2 or similar shells that require specific initialization args. Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
Add documentation explaining: - The -c flag is for POSIX-compatible shells (the expected use case) - quoteStringIfNeeded handles spaces and ampersands per existing codebase behavior Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix automationProfile to handle args parameter correctly
Fix automationProfile to handle args and env parameters
Jan 29, 2026
Contributor
|
@copilot can you keep the "shell type" label instead of changing it to "shell path"? If you strongly believe this should be changed, please explain why. Also existing tests are failing. Please update the tests to account for the new changes. |
- Reverted "shell path" back to "shell type" in log message as requested - Updated test baselines to include new "shell args" output line Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
Contributor
Author
Reverted "shell path" back to "shell type" and updated the test baselines ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
automationProfile.argsandenvare ignored inspawnChildProcess/src/util.tsargsandenvparameters fromautomationProfileAutomationProfileSettinginterface andparseShellSettinghelper functionparseShellSettingfunctionOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.