This commit is contained in:
2025-11-27 17:26:53 +03:00
parent 5222cceb81
commit eef82577ab
11 changed files with 333 additions and 160 deletions

View File

@@ -34,8 +34,15 @@ function runCommand(command: string, cwd: string, onData: (chunk: string) => voi
env: { ...process.env, CI: process.env.CI || "1" }
});
child.stdout.on("data", (data) => onData(cleanOutput(data.toString())));
child.stderr.on("data", (data) => onData(cleanOutput(data.toString())));
const emitLines = (chunk: Buffer) => {
const cleaned = cleanOutput(chunk.toString()).replace(/\r\n|\r/g, "\n");
cleaned.split("\n").forEach((line) => {
onData(line);
});
};
child.stdout.on("data", emitLines);
child.stderr.on("data", emitLines);
child.on("error", (err) => {
onData(`Hata: ${err.message}`);