This commit is contained in:
leedongmyung 2023-11-12 21:24:19 +09:00
parent b25f006110
commit c487d6fc8d

View file

@ -53,21 +53,17 @@ class Application {
]).then((ProcessResult result) => jsonStr = result.stdout);
jenkinsMap = getMapFromJson(jsonStr)!;
} else if (Platform.isWindows) {
List<int>? stdout;
List<int>? stderr;
await Process.run(
'cmd',
[
'/C',
'${Directory.current.path}/assets/script/batch/jenkins_env_params.bat'
],
stdoutEncoding: Encoding.getByName('euc-kr'),
stderrEncoding: Encoding.getByName('euc-kr'))
.then((ProcessResult result) {
String? stdout;
String? stderr;
await Process.run('cmd', [
'/C',
'${Directory.current.path}/assets/script/batch/jenkins_env_params.bat'
]).then((ProcessResult result) {
stdout = result.stdout;
stderr = result.stderr;
});
jsonStr = eucKr.decode(stdout!).replaceAll('\\', '/');
List<int> bytes = utf8.encode(stdout!);
jsonStr = eucKr.decode(bytes).replaceAll('\\', '/');
jenkinsMap = getMapFromJson(jsonStr);
} else {
enable = false;