Skip to content

Commit 86b98da

Browse files
seasonyuuxychen
authored and
xychen
committed
fix cskburn onPartition not call on Ubuntu
1 parent bdc89c7 commit 86b98da

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/utils/cskburn.ts

+10-6
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,19 @@ export async function cskburn(
7676
}
7777

7878
command.stdout.on('data', async (data: Uint8Array) => {
79-
const line = await decode(data);
80-
outputs.push(line);
81-
handleOutput(line.trim());
79+
const dataStr = await decode(data);
80+
outputs.push(dataStr);
81+
dataStr.split('\n').forEach((line) => {
82+
handleOutput(line.trim());
83+
});
8284
});
8385

8486
command.stderr.on('data', async (data: Uint8Array) => {
85-
const line = await decode(data);
86-
outputs.push(line);
87-
handleOutput(line.trim());
87+
const dataStr = await decode(data);
88+
outputs.push(dataStr);
89+
dataStr.split('\n').forEach((line) => {
90+
handleOutput(line.trim());
91+
});
8892
});
8993

9094
command.once('close', (data) => {

0 commit comments

Comments
 (0)