test
This commit is contained in:
parent
7680ba8103
commit
c1fcb69ea4
1 changed files with 3 additions and 9 deletions
|
|
@ -200,24 +200,18 @@ 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}\n' +
|
||||
'==============================================================\n' +
|
||||
'Result: ${eucKr.decode(out)}\n' +
|
||||
'Result: ${eucKr.decode(processResult!.stdout)}\n' +
|
||||
'==============================================================\n' +
|
||||
'Error: ${eucKr.decode(err)}');
|
||||
'Error: ${eucKr.decode(processResult!.stderr)}');
|
||||
}
|
||||
file.deleteSync();
|
||||
c.complete(processResult);
|
||||
|
|
|
|||
Loading…
Reference in a new issue