From b25f006110599a90932e7fcc0d7d671876abe82c Mon Sep 17 00:00:00 2001 From: leedongmyung Date: Sun, 12 Nov 2023 21:15:43 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B8=EC=BD=94=EB=94=A9=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/oto/application.dart | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/lib/oto/application.dart b/lib/oto/application.dart index d5bb71f..4151bd5 100644 --- a/lib/oto/application.dart +++ b/lib/oto/application.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:convert'; import 'dart:io'; import 'package:dart_framework/charset/euc_kr.dart'; import 'package:dart_framework/utils/system_util.dart'; @@ -52,11 +53,21 @@ class Application { ]).then((ProcessResult result) => jsonStr = result.stdout); jenkinsMap = getMapFromJson(jsonStr)!; } else if (Platform.isWindows) { - await Process.run('cmd', [ - '/C', - '${Directory.current.path}/assets/script/batch/jenkins_env_params.bat' - ]).then((ProcessResult result) => jsonStr = result.stdout); - jsonStr = jsonStr.replaceAll('\\', '/'); + List? stdout; + List? 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) { + stdout = result.stdout; + stderr = result.stderr; + }); + jsonStr = eucKr.decode(stdout!).replaceAll('\\', '/'); jenkinsMap = getMapFromJson(jsonStr); } else { enable = false;