MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / notify

Function notify

apps/kimi-code/scripts/postinstall/ui.mjs:84–93  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

82 * the log file stays readable.
83 */
84export function notify(line) {
85 const text = line + '\n';
86 try {
87 writeFileSync(TERMINAL_DEVICE, text);
88 return;
89 } catch {
90 // Terminal device not writable (CI, sandboxed environments).
91 }
92 process.stdout.write(stripAnsi(text));
93}
94
95// Single-quote `path` for safe interpolation in a POSIX `sh` command.
96// Wraps in single quotes and escapes any embedded `'` as `'\''`.

Callers 2

postinstall.mjsFile · 0.90
emitFunction · 0.85

Calls 2

stripAnsiFunction · 0.70
writeMethod · 0.65

Tested by

no test coverage detected