MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / suppressProcessStdioWrites

Function suppressProcessStdioWrites

src/utils/shutdown-state.ts:34–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32}
33
34export function suppressProcessStdioWrites(): void {
35 if (stdioSuppressed) {
36 return;
37 }
38
39 const stdout = process.stdout as StdioWriteTarget | undefined;
40 const stderr = process.stderr as StdioWriteTarget | undefined;
41
42 originalStdoutWrite = typeof stdout?.write === 'function' ? stdout.write.bind(stdout) : null;
43 originalStderrWrite = typeof stderr?.write === 'function' ? stderr.write.bind(stderr) : null;
44
45 const suppressedWrite = createSuppressedWrite();
46 setWrite(stdout, suppressedWrite);
47 setWrite(stderr, suppressedWrite);
48 stdioSuppressed = true;
49}
50
51export function restoreProcessStdioWritesForTests(): void {
52 const stdout = process.stdout as StdioWriteTarget | undefined;

Callers 5

handleStdinEndFunction · 0.90
handleStdinCloseFunction · 0.90
handleStdoutErrorFunction · 0.90
handleStderrErrorFunction · 0.90

Calls 2

createSuppressedWriteFunction · 0.85
setWriteFunction · 0.85

Tested by

no test coverage detected