mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-03 17:59:50 +02:00
fix(stream): re-export global TextDecoder
stream instead of implementing our own one which doesn't work correctly in stream mode
This commit is contained in:
parent
7bb1063a12
commit
edf532caf4
14 changed files with 78 additions and 42 deletions
|
@ -10,7 +10,7 @@ import {
|
|||
AdbSubprocessNoneProtocol,
|
||||
AdbSubprocessShellProtocol,
|
||||
} from "@yume-chan/adb";
|
||||
import { ConcatStringStream, DecodeUtf8Stream } from "@yume-chan/stream-extra";
|
||||
import { ConcatStringStream, TextDecoderStream } from "@yume-chan/stream-extra";
|
||||
|
||||
export class Cmd extends AdbCommandBase {
|
||||
#supportsShellV2: boolean;
|
||||
|
@ -84,10 +84,10 @@ export class Cmd extends AdbCommandBase {
|
|||
|
||||
const [stdout, stderr, exitCode] = await Promise.all([
|
||||
process.stdout
|
||||
.pipeThrough(new DecodeUtf8Stream())
|
||||
.pipeThrough(new TextDecoderStream())
|
||||
.pipeThrough(new ConcatStringStream()),
|
||||
process.stderr
|
||||
.pipeThrough(new DecodeUtf8Stream())
|
||||
.pipeThrough(new TextDecoderStream())
|
||||
.pipeThrough(new ConcatStringStream()),
|
||||
process.exit,
|
||||
]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue