mirror of
https://github.com/davidkaya/aryx.git
synced 2026-08-27 13:23:57 +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}'.");
|
throw new InvalidOperationException($"Failed to start command '{executablePath}'.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
process.StandardInput.Close();
|
||||||
Task<string> standardOutputTask = process.StandardOutput.ReadToEndAsync(timeoutSource.Token);
|
Task<string> standardOutputTask = process.StandardOutput.ReadToEndAsync(timeoutSource.Token);
|
||||||
Task<string> standardErrorTask = process.StandardError.ReadToEndAsync(timeoutSource.Token);
|
Task<string> standardErrorTask = process.StandardError.ReadToEndAsync(timeoutSource.Token);
|
||||||
|
|
||||||
@@ -318,6 +319,7 @@ internal static partial class CopilotConnectionMetadataResolver
|
|||||||
{
|
{
|
||||||
RedirectStandardOutput = true,
|
RedirectStandardOutput = true,
|
||||||
RedirectStandardError = true,
|
RedirectStandardError = true,
|
||||||
|
RedirectStandardInput = true,
|
||||||
UseShellExecute = false,
|
UseShellExecute = false,
|
||||||
CreateNoWindow = true,
|
CreateNoWindow = true,
|
||||||
StandardOutputEncoding = Encoding.UTF8,
|
StandardOutputEncoding = Encoding.UTF8,
|
||||||
|
|||||||
Reference in New Issue
Block a user