test
This commit is contained in:
parent
5de28b7755
commit
69793a91f2
1 changed files with 2 additions and 8 deletions
|
|
@ -194,20 +194,14 @@ class ProcessExecutor {
|
|||
print('Execute Bat: ${file.path} \n ${shell.toString()}');
|
||||
file.createSync();
|
||||
file.writeAsStringSync(shell.toString());
|
||||
await Process.run('cmd', ['/C', file.path],
|
||||
workingDirectory: workspace,
|
||||
stdoutEncoding: Encoding.getByName('euc-kr'),
|
||||
stderrEncoding: Encoding.getByName('euc-kr'))
|
||||
await Process.run('cmd', ['/C', file.path], workingDirectory: workspace)
|
||||
.then((ProcessResult result) {
|
||||
processResult = result;
|
||||
});
|
||||
if (printStdout) {
|
||||
Uint8List out = processResult!.stdout;
|
||||
Uint8List err = processResult!.stderr;
|
||||
|
||||
print(
|
||||
// ignore: prefer_interpolation_to_compose_strings
|
||||
'[ProcessExecutor] Exit Code: ${processResult!.exitCode}, Result: ${cp949.decode(out)}\nError: ${cp949.decode(err)}');
|
||||
'[ProcessExecutor] Exit Code: ${processResult!.exitCode}, Result: ${cp949.decodeString(processResult!.stdout)}\nError: ${cp949.decodeString(processResult!.stderr)}');
|
||||
}
|
||||
file.deleteSync();
|
||||
c.complete(processResult);
|
||||
|
|
|
|||
Loading…
Reference in a new issue