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
+2 -2
View File
@@ -6,6 +6,7 @@
import { execSync, spawn, spawnSync } from 'node:child_process';
import { debugLogger } from './debugLogger.js';
import { coreEvents, CoreEvent } from './events.js';
export type EditorType =
| 'vscode'
@@ -189,7 +190,6 @@ export async function openDiff(
oldPath: string,
newPath: string,
editor: EditorType,
onEditorClose: () => void,
): Promise<void> {
const diffCommand = getDiffCommand(oldPath, newPath, editor);
if (!diffCommand) {
@@ -211,7 +211,7 @@ export async function openDiff(
throw new Error(`${editor} exited with code ${result.status}`);
}
} finally {
onEditorClose();
coreEvents.emit(CoreEvent.ExternalEditorClosed);
}
return;
}