Update
This commit is contained in:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user