mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-23 01:37:16 -07:00
fix(core): suppress PTY resize EBADF errors (#27461)
This commit is contained in:
committed by
GitHub
parent
85563dabe8
commit
8b56d27901
@@ -1517,12 +1517,13 @@ export class ShellExecutionService {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
const err = e as { code?: string; message?: string };
|
||||
const isEsrch = err.code === 'ESRCH';
|
||||
const isEbadf = err.code === 'EBADF' || err.message?.includes('EBADF');
|
||||
const isWindowsPtyError = err.message?.includes(
|
||||
'Cannot resize a pty that has already exited',
|
||||
);
|
||||
|
||||
if (isEsrch || isWindowsPtyError) {
|
||||
// On Unix, we get an ESRCH error.
|
||||
if (isEsrch || isEbadf || isWindowsPtyError) {
|
||||
// On Unix, we get an ESRCH or EBADF error.
|
||||
// On Windows, we get a message-based error.
|
||||
// In both cases, it's safe to ignore.
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user