Protect stdout and stderr so JavaScript code can't accidentally write to stdout corrupting ink rendering (#13247)

Bypassing rules as link checker failure is spurious.
This commit is contained in:
Jacob Richman
2025-11-20 10:44:02 -08:00
committed by GitHub
parent e20d282088
commit d1e35f8660
82 changed files with 1523 additions and 868 deletions

View File

@@ -9,7 +9,7 @@ import fs from 'node:fs';
import os from 'node:os';
import pathMod from 'node:path';
import { useState, useCallback, useEffect, useMemo, useReducer } from 'react';
import { unescapePath } from '@google/gemini-cli-core';
import { unescapePath, coreEvents, CoreEvent } from '@google/gemini-cli-core';
import {
toCodePoints,
cpLen,
@@ -1893,6 +1893,7 @@ export function useTextBuffer({
console.error('[useTextBuffer] external editor error', err);
} finally {
enableSupportedProtocol();
coreEvents.emit(CoreEvent.ExternalEditorClosed);
if (wasRaw) setRawMode?.(true);
try {
fs.unlinkSync(filePath);