fix(supervisor): quote space-containing args in PowerShell Start-Process on Windows#14910
Open
samclark2015 wants to merge 1 commit into
Open
fix(supervisor): quote space-containing args in PowerShell Start-Process on Windows#14910samclark2015 wants to merge 1 commit into
samclark2015 wants to merge 1 commit into
Conversation
When kernelSupervisor.shutdownTimeout is non-default, Kallichore is launched via PowerShell's Start-Process on Windows. PowerShell joins -ArgumentList array elements with spaces when building the cmd.exe command line, so a path like `c:\Program Files\...\kcserver.exe` is split at the space, causing `'c:\Program' is not recognized` errors. Wrap arguments containing spaces in double-quotes within the PowerShell array so cmd.exe treats them as single tokens. Also change supervisor-wrapper.bat to use %~1 (which strips surrounding double-quotes) when assigning the output file path. Fixes #14671 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
E2E Tests 🚀 Why these tags?
More on automatic tags from changed files. |
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.
Fixes #14671
When
kernelSupervisor.shutdownTimeoutis changed from the default (immediately) on Windows, Positron launches the Kallichore server via PowerShell'sStart-Process. PowerShell joins-ArgumentListarray elements with spaces when building thecmd.execommand line, so a path likec:\Program Files\...\kcserver.exeis split at the space andcmd.exetries to runc:\Program— producing the 'c:\Program' is not recognized error.The fix wraps arguments that contain spaces in double-quotes within the PowerShell array so
cmd.exetreats each path as a single token. The batch wrapper is also updated to use%~1(strips surrounding double-quotes) when assigning the output file path, for defensive correctness.Release Notes
New Features
Bug Fixes
kernelSupervisor.shutdownTimeoutis non-default on Windows installations with spaces in the path (supervisor: failure when kernelSupervisor.shutdownTimeout is changed from default on Windows installations with spaces in the path #14671)Validation Steps
@:win @:sessions
This fix is Windows-only and requires an installation in a path containing spaces (e.g.
C:\Program Files\Positron\):kernelSupervisor.shutdownTimeouttowhen idle(or any non-immediatelyvalue)