mirror of
https://github.com/davidkaya/aryx.git
synced 2026-08-05 19:38:32 +02:00
fix: close stdin for sidecar subprocess probes
Redirect and immediately close stdin for sidecar-spawned CLI subprocesses so they do not inherit the long-lived stdio pipe from the Electron/Node host. This fixes the Copilot version probe timing out under the actual app runtime while preserving the direct CLI and account diagnostics behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -298,6 +298,7 @@ internal static partial class CopilotConnectionMetadataResolver
|
||||
throw new InvalidOperationException($"Failed to start command '{executablePath}'.");
|
||||
}
|
||||
|
||||
process.StandardInput.Close();
|
||||
Task<string> standardOutputTask = process.StandardOutput.ReadToEndAsync(timeoutSource.Token);
|
||||
Task<string> standardErrorTask = process.StandardError.ReadToEndAsync(timeoutSource.Token);
|
||||
|
||||
@@ -318,6 +319,7 @@ internal static partial class CopilotConnectionMetadataResolver
|
||||
{
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
RedirectStandardInput = true,
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true,
|
||||
StandardOutputEncoding = Encoding.UTF8,
|
||||
|
||||
Reference in New Issue
Block a user