@@ -49,11 +49,13 @@ final class NodeProcessManager implements Closeable, ProcessManager {
49
49
Map <String , String >? environment,
50
50
bool includeParentEnvironment = true ,
51
51
bool runInShell = false ,
52
- Encoding stdoutEncoding = const Utf8Codec (allowMalformed : true ) ,
53
- Encoding stderrEncoding = const Utf8Codec (allowMalformed : true ) ,
52
+ Encoding ? stdoutEncoding,
53
+ Encoding ? stderrEncoding,
54
54
NodeChildProcess ? pipe,
55
55
bool echoOutput = false ,
56
56
}) async {
57
+ stdoutEncoding ?? = const Utf8Codec (allowMalformed: true );
58
+ stderrEncoding ?? = const Utf8Codec (allowMalformed: true );
57
59
final process = await start (
58
60
command,
59
61
workingDirectory: workingDirectory,
@@ -101,10 +103,12 @@ final class NodeProcessManager implements Closeable, ProcessManager {
101
103
Map <String , String >? environment,
102
104
bool includeParentEnvironment = true ,
103
105
bool runInShell = false ,
104
- Encoding stdoutEncoding = const Utf8Codec (allowMalformed : true ) ,
105
- Encoding stderrEncoding = const Utf8Codec (allowMalformed : true ) ,
106
+ Encoding ? stdoutEncoding,
107
+ Encoding ? stderrEncoding,
106
108
bool echoOutput = false ,
107
109
}) {
110
+ stdoutEncoding ?? = const Utf8Codec (allowMalformed: true );
111
+ stderrEncoding ?? = const Utf8Codec (allowMalformed: true );
108
112
final [executable, ...args] = command.cast <String >();
109
113
final result = childProcess.execSync (
110
114
executable,
0 commit comments