Repository navigation
fix: preserve Windows PowerShell Unicode output #452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -431,7 +431,11 @@ export class ProcessSessionManager { | |
| const shell = resolveShellCommand(input.command); | ||
| const detached = process.platform !== "win32"; | ||
|
|
||
| const child = spawn(input.command, { | ||
| const command = process.platform === "win32" | ||
| ? `chcp 65001>nul && ${input.command}` | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| : input.command; | ||
|
|
||
| const child = spawn(command, { | ||
| cwd: input.cwd, | ||
| env: processEnvironment({ | ||
| workspaceId: input.workspaceId, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: Waishnav/devspace
Length of output: 1785
Script executed:
Repository: Waishnav/devspace
Length of output: 13022
Script executed:
Repository: Waishnav/devspace
Length of output: 1700
Raise the yield time for the new PowerShell test.
The Windows test at
src/process-sessions.test.ts:84passesyieldTimeMs: 2_000.ProcessSessionManager.startreturns after that time even if the process is still running, and the test then assertsrunningisfalse. If PowerShell takes more than two seconds to start and finish on the Windows CI runner, the completion assertion fails. Raising the value to10_000does not slow passing runs, becausewaitForExitreturns as soon as the process exits.Suggested fix