mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-23 01:37:16 -07:00
fix(core): harden PTY resize against native crashes (#27496)
This commit is contained in:
committed by
GitHub
parent
5cac7c10fa
commit
bd53951dc8
@@ -21,9 +21,12 @@ import {
|
||||
// Tracking bug: https://github.com/microsoft/node-pty/issues/827
|
||||
process.on('uncaughtException', (error) => {
|
||||
if (error instanceof Error) {
|
||||
const message = error.message || '';
|
||||
const isPtyResizeError =
|
||||
error.message === 'Cannot resize a pty that has already exited';
|
||||
const isEbadfError = error.message.includes('EBADF');
|
||||
message === 'Cannot resize a pty that has already exited';
|
||||
const isEbadfError =
|
||||
message.includes('EBADF') ||
|
||||
(error as { code?: string }).code === 'EBADF';
|
||||
const isFromNodePty =
|
||||
error.stack?.includes('node-pty') || error.stack?.includes('PtyResize');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user