Fix/windows pty crash (#12587)

Co-authored-by: LayorX <yor31117@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Bryan Morgan
2025-11-05 11:53:03 -05:00
committed by GitHub
parent f51d74586c
commit 16113647de
8 changed files with 125 additions and 45 deletions
@@ -771,9 +771,11 @@ export class ShellExecutionService {
if (
e instanceof Error &&
(('code' in e && e.code === 'ESRCH') ||
e.message === 'Cannot resize a pty that has already exited')
e.message.includes('Cannot resize a pty that has already exited'))
) {
// ignore
// On Unix, we get an ESRCH error.
// On Windows, we get a message-based error.
// In both cases, it's safe to ignore.
} else {
throw e;
}