Merge branch 'master' into osc52
This commit is contained in:
@@ -25,11 +25,11 @@ perfContext('Terminal: ls -lR /usr/lib', () => {
|
||||
});
|
||||
const chunks: Buffer[] = [];
|
||||
let length = 0;
|
||||
p.on('data', data => {
|
||||
p.onData(data => {
|
||||
chunks.push(data as unknown as Buffer);
|
||||
length += data.length;
|
||||
});
|
||||
await new Promise<void>(resolve => p.on('exit', () => resolve()));
|
||||
await new Promise<void>(resolve => p.onExit(() => resolve()));
|
||||
contentUtf8 = Buffer.concat(chunks, length);
|
||||
// translate to content string
|
||||
const buffer = new Uint32Array(contentUtf8.length);
|
||||
|
||||
Reference in New Issue
Block a user